public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Tom Kacvinsky <tkacvins@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Difference in -E output
Date: Thu, 27 Oct 2022 17:28:28 -0500	[thread overview]
Message-ID: <20221027222827.GD25951@gate.crashing.org> (raw)
In-Reply-To: <CAG_eJLcR7d1WRi9bwngK8njFEf8TwBnKvSTJmEUCN6ntoPNpxg@mail.gmail.com>

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.

Have fun,


Segher

  reply	other threads:[~2022-10-27 22:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27 20:22 Tom Kacvinsky
2022-10-27 22:28 ` Segher Boessenkool [this message]
2022-10-27 22:33   ` Tom Kacvinsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221027222827.GD25951@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-help@gcc.gnu.org \
    --cc=tkacvins@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).