g++/cpp problem with macros expanding to /##/
Craig Bridge
Craig.Bridge@seagatesoftware.com
Sat Oct 3 07:14:00 GMT 1998
The "Just don't do it" answer doesn't cut it.
Is there a simple way to get two preprocessor passes?
I haven't figured out how to get g++ to take input from
stdin.
Most of the comercially available compilers, Borland, Intergraph,
Microsoft, Sun, Watcom, etc. support this feature.
Many of their header files even use this trick to allow them to
share include files between systems with various capabilities.
-Craig
> -----Original Message-----
> From: Alexandre Oliva [SMTP:oliva@dcc.unicamp.br]
> Sent: Friday, October 02, 1998 8:14 PM
> To: Craig Bridge
> Cc: 'egcs-bugs@cygnus.com'
> Subject: Re: g++/cpp problem with macros expanding to /##/
>
> Craig Bridge <Craig.Bridge@seagatesoftware.com> writes:
>
> > Neither Preprocessor nor Comiler passes discard preprocessor
> "generated"
> > comments.
> > Any recommendations?
>
> Don't use this trick; a Standard-compliant compiler is not required to
>
> support it. Comments are stripped before macro expansion takes
> place.
>
> --
> Alexandre Oliva
> mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
> http://www.dcc.unicamp.br/~oliva
> Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list