This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFA] Add -CC option to cpplib to save comments in macros
On Apr 25, 2002, Jason R Thorpe <thorpej@wasabisystems.com> wrote:
> On Thu, Apr 25, 2002 at 02:55:48PM -0300, Alexandre Oliva wrote:
>> How about something like:
>>
>> a = // gotcha */ b; /*
>> foo ();
>>
>> it surely means something other than
>>
>> a = /* gotcha */ b; /**/
>> foo ();
> Note the C++ -> C comment conversion is only done if the comment appears
> within a macro, and only with -CC.
So make it:
#define set(var) var = // */ gotcha /*
set (a) foo ();
admittedly, one would hope nobody would ever write a macro like that,
for various reasons, but... This shouldn't matter, the preprocessor
should generate correct preprocessed code. If -CC sometimes doesn't,
-CC is buggy, if you ask me.
> I'll try to cook up a patch for the docs soon (quite swamped with about
> 5 "top priority!!!" things right now).
Heh. I know the feeling :-(
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer