This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C99 usage in gcc
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Joe Buck <Joe dot Buck at synopsys dot COM>
- Cc: Zack Weinberg <zack at codesourcery dot com>, Bruce Stephens <bruce at cenderis dot demon dot co dot uk>, GCC List <gcc at gcc dot gnu dot org>
- Date: Mon, 2 Feb 2004 23:45:47 +0000 (UTC)
- Subject: Re: C99 usage in gcc
- References: <877jzal3rz.fsf@wasabisystems.com> <C02436AE-52C3-11D8-9D26-000393A6D2F2@physics.uc.edu><16410.14766.949435.377839@cuddles.cambridge.redhat.com><Pine.LNX.4.58.0401301433440.3429@wotan.suse.de> <87wu79zcos.fsf@cenderis.demon.co.uk><873c9wt23o.fsf@codesourcery.com> <20040202153402.C7898@synopsys.com>
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