This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] stray semi-colons in libstdc++ testsuite
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Dirk Mueller <mueller at kde dot org>
- Cc: gcc-patches at gcc dot gnu dot org, Jonathan Wakely <jwakely dot gcc at gmail dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 10 Dec 2007 09:12:03 -0500
- Subject: Re: [patch] stray semi-colons in libstdc++ testsuite
- References: <4348dea50712091120w4df4df65v6efa62b110fea294@mail.gmail.com> <200712101505.53082.mueller@kde.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Dec 10, 2007 at 03:05:52PM +0100, Dirk Mueller wrote:
> --- cp/parser.c (revision 130658)
> +++ cp/parser.c (working copy)
> @@ -11567,6 +11567,15 @@ cp_parser_namespace_definition (cp_parse
> pop_namespace ();
> /* Look for the final `}'. */
> cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'");
> +
> + if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON))
> + {
> + cp_lexer_consume_token (parser->lexer);
> + if (pedantic && !in_system_header)
> + pedwarn ("extra %<;%>");
> + else
> + warning (OPT_Wc__0x_compat, "extra %<;%>");
> + }
> }
Shouldn't the in_system_header check go to the outer if?
Jakub