PR c++/12479
* parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;"
pedwarn when not in a system header.
PR c++/12479
* g++.dg/parse/semicolon1.C: New test.
* g++.dg/parse/semicolon1.h: Likewise.
From-SVN: r74940
+2003-12-22 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/12479
+ * parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;"
+ pedwarn when not in a system header.
+
2003-12-21 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE,
{
/* A declaration consisting of a single semicolon is
invalid. Allow it unless we're being pedantic. */
- if (pedantic)
+ if (pedantic && !in_system_header)
pedwarn ("extra `;'");
cp_lexer_consume_token (parser->lexer);
continue;
+2003-12-22 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/12479
+ * g++.dg/parse/semicolon1.C: New test.
+ * g++.dg/parse/semicolon1.h: Likewise.
+
2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
PR c/9163
--- /dev/null
+// PR c++/12479
+// { dg-options "-pedantic" }
+
+#include "semicolon1.h"
--- /dev/null
+#pragma GCC system_header
+;