From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 1700E384B128 for ; Thu, 27 Oct 2022 20:22:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1700E384B128 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x633.google.com with SMTP id y14so7907932ejd.9 for ; Thu, 27 Oct 2022 13:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=PQE+MVqyNgDUPdONk3wIzIJb5JLvarIEQotAmIw1T/o=; b=Je8J6x5pivg4/hVHxiD3YhzFGVN/Ziw6RpRxBfLEwuejBIyrsGLjQMPRzAFDoJld7N BMgeT9IqDgKC+H17qsq9ZJIPB3eY7BoVmGfURC3/J7579YqFrxpukcgqHNn/U7tiZF7P Gt3wubkP2jGltDxC60q0MdgwB4TlyMq6UX83lsUyQpCvEPchIzc2FQ5zy+WG8WF4wRYp aAK7M4FEg7pBeSkTKYc1dxrppIvqzkAEamZJOWYJRgFTY6USFAoTUbvXdbB4epBZuSeE nTxCdiukOjoXhRvJleyoEALC+hbp3KYH9gyWvpv4Wl94EfdyBpENG4znoORj5l4QY5TL WWoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PQE+MVqyNgDUPdONk3wIzIJb5JLvarIEQotAmIw1T/o=; b=h8H8jtYLLe3ovc9xfXmMjDKfGesHHqsCXn0hI+nhBlmhOGe+0XyqKk7wmuok8edFI3 Jw3RbOg5aK26s+SypwgNl2SDOC5y2ghGvnABVe3Irh8eMuFSdOCkJ9ofdYyspmV8r4Vx tUlNfp1syq0NFVgljwRB1uSn0wULLOxfQkl83bF0I0OihIXs0AKKbVofGoGj76SUtmlE tZPo0Zqi0BOHz2B8g5eoRa19I4YCEVzw9S+1v0NIDxVZjvacjsOvPA3jHJEcrxMzQauU hVqiHNlwUAMCXZOL55sCOOPYsN2frZsOn09LdmPOsg2hU+kRtW/XvAOCevGUjd2ihf0G dkCA== X-Gm-Message-State: ACrzQf0oKjh6wg0MuLaccpiJij1ihwCw8oLHXthtGX0JDa52vrg9LJZ6 fix0X1s0ZY/1YCmOu6hVNLikPeNfh9CrTNPq/drGphATJyQ= X-Google-Smtp-Source: AMsMyM7BsljiCpElTmRc6j2eaNVzhoIJhQJSZljk3GwRZqsXuZVbk0NIsDM6ThPHHXA5jUQXWdRGXFdt/o6g0y8eq28= X-Received: by 2002:a17:907:7250:b0:791:9093:47f7 with SMTP id ds16-20020a170907725000b00791909347f7mr44121567ejc.278.1666902143028; Thu, 27 Oct 2022 13:22:23 -0700 (PDT) MIME-Version: 1.0 From: Tom Kacvinsky Date: Thu, 27 Oct 2022 16:22:11 -0400 Message-ID: Subject: Difference in -E output To: gcc-help Content-Type: multipart/alternative; boundary="0000000000001c558105ec09e6fc" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000001c558105ec09e6fc Content-Type: text/plain; charset="UTF-8" I am working on an issue that involves our tool depending on the preprocessed output from gcc -E. This simple test program exhibits the problem #include int main() { return EXIT_SUCCESS; } With some elision, this preprocesses to: # 3 "test.c" int main() { return # 4 "test.c" 3 4 0 # 4 "test.c" ; } Notice how when the macro EXIT_SUCCESS is expanded, we get several lines around the 0? This is happening for us with GCC 8.3. But using something as early as 4.8.5 (yeah, I know, bad idea), we get this: int main() { return 0; } I am pretty sure this is an intentional change. What I'd like to know is if there is a way of reverting back to the former behavior? I looked at https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#Preprocessor-Options But didn't see anything that jumped out at me and said "this is how you can work around it" I did a modicum of bi-secting to see that this change was introduced somewhere between gcc 4.9.3 and 5.4.0. I can go deeper to figure out which version actually broke it if you would find it helpful. If anyone has some ideas on this, I'd appreciate hearing them. Thanks, Tom --0000000000001c558105ec09e6fc--