From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 965753858C30 for ; Thu, 27 Oct 2022 22:33:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 965753858C30 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-ed1-x536.google.com with SMTP id z97so5290961ede.8 for ; Thu, 27 Oct 2022 15:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=Jj5RCsiJfITe7QpkxtWklb2xc/l3Ec7bi4/cz15EdyY=; b=Yv01R7aDCjkdF0DPiRv7Fju8jHyDobfsdOb39FaoqwtMDYrNSfvT+jmQdvnPEfj4Kb MDUg1b8jfzsNeBDBB7KU1BEt1k1FgNP4pg22qxRw2d3Rv3FwhAVogsYUQYSLVCLzzvXl u+hZ/buZSm7oNokJbD1xSJ+TYOw6FPWDqcTuNdztO7sA6mVbQRgSiiJG+Zm4cUSGXi/N 8noB2Vn3P3z4rW0Q5Ked1n5631MfhqQfyG7mHTZ6EF0hn1jee4mcggeTMXe9ytiY5rdR 7L3zZRmS1PWjIEjz9tOOh1zaLIiKZYmriAuazD3cWD8A3pHhPo7RW2DDdgQtnLnND+Hs 6VTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Jj5RCsiJfITe7QpkxtWklb2xc/l3Ec7bi4/cz15EdyY=; b=RtJx1sN0k9W+YMhPkPZo8kxsd+uV1gkhyS3mqzi/fVS53AMMUsVpkjQGrYvacNEB+t yRaqzEeJPOsiQRDOUVSQDxo1bdmXUwazdcEJTidFf00dzRWnvDoNfH4+iEJJ7B2dkDNi oGOb1nOY0oXg4otqIqhhwa3lrxOfaxkVfvfrBW0VKD/1yNltBlM6zhm3xrsp2cKUc3mA Yf4dWXRCxww9oga14gK7KJpklxe8i9R8/c/hCqX0v1siMKWIQlIYu2NqFNt4dmwK9MsU rTOsCF9OwIj5NoW0Uhc8LUOTvZ2AhD/MUwPLfe9anvxiUlmixVvskUkDjd0TaQt5X43B spfQ== X-Gm-Message-State: ACrzQf1Vq7c3vAz9/JDEXKP0b1//uIk7V82RnGs5X25ImbsGUtzeIGrY ZN7MVpf581qaWL/9dpb47hjT/ByTNXQtztkFiJAEmSTR+nA= X-Google-Smtp-Source: AMsMyM5P8iCkWpyNX9eMnu13GF3DVnpxNbwclNOwbYl9ac5gifUGVrEk8gQs9iGUrp9wA1d1xYwB2x/Rd2qjw0IcY/8= X-Received: by 2002:a05:6402:4441:b0:454:8a74:5459 with SMTP id o1-20020a056402444100b004548a745459mr46708724edb.155.1666910017736; Thu, 27 Oct 2022 15:33:37 -0700 (PDT) MIME-Version: 1.0 References: <20221027222827.GD25951@gate.crashing.org> In-Reply-To: <20221027222827.GD25951@gate.crashing.org> From: Tom Kacvinsky Date: Thu, 27 Oct 2022 18:33:26 -0400 Message-ID: Subject: Re: Difference in -E output To: gcc-help Content-Type: multipart/alternative; boundary="0000000000007ad4ee05ec0bbb5b" X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,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: --0000000000007ad4ee05ec0bbb5b Content-Type: text/plain; charset="UTF-8" On Thu, Oct 27, 2022 at 6:30 PM Segher Boessenkool < segher@kernel.crashing.org> wrote: > On Thu, Oct 27, 2022 at 04:22:11PM -0400, Tom Kacvinsky via Gcc-help wrote: > > I am working on an issue that involves our tool depending on the > > preprocessed output from gcc -E. > > > # 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? > > I don't get any of the blank lines you have though? > > > 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 > > -P will do what you want (as a side effect though). -traditional also > works (and that one is more intentional). Neither of those does *only* > this, but either may be usable for your purposes. > A colleague informed me that -ftrack-macro-expansion=0 does exactly what I want. Said colleague also told me to call them the next time a question like this came up. Haha --0000000000007ad4ee05ec0bbb5b--