Re: Difference in -E output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux