This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C99 usage in gcc


On Mon, 2 Feb 2004, Joe Buck wrote:

> I disagree.  There should be no warning, because the plain-C89 compiler
> will *not* misinterpret this file.  True, the // will not be interpreted
> as a comment; since there is no token "//" in C89 it will be interpreted
> as two / tokens.  Nevertheless, the token stream with the two / tokens is
> ifdef'ed out, so it's a don't care.

But there should still be a warning for the case when what's after the //
isn't a valid sequence of preprocessing tokens, in particular for
unmatched quotes in it.  (Regression bug 12743 is that this sort of thing
fails to get diagnostics at all in #ifdefed out code.)

-- 
Joseph S. Myers
jsm@polyomino.org.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]