summaryrefslogtreecommitdiffstats
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-03 16:53:27 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-03 16:53:27 +0000
commit2c584053e7a50135ab299115a5d7b909bd65355f (patch)
treeaad012333fc4dc0d216db7ad633eef56c2ea58ea /gcc/cp/parser.c
parentce0713c7a0ec55b28fa098bfc17c772fc537f5e9 (diff)
downloadppe42-gcc-2c584053e7a50135ab299115a5d7b909bd65355f.tar.gz
ppe42-gcc-2c584053e7a50135ab299115a5d7b909bd65355f.zip
PR c++/13975
* tree.h (enum tree_index): Add TI_PUBLIC, TI_PROTECTED, and TI_PRIVATE. (access_public_node): Redefine. (access_protected_node): Likewise. (access_private_node): Likewise. * tree.c (build_common_tree_nodes): Create access_public_node, access_protected_node, and access_private_node. PR c++/13978 * pt.c (build_non_dependent_expr): Do not build NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs. PR c++/13968 * semantics.c (finish_id_expression): Do not return an IDENTIFIER_NODE when lookup finds a VAR_DECL. PR c++/13975 * parser.c (cp_parser_simple_declaration): When skipping to the end of the statement swallow the terminating semicolon. PR c++/13978 * g++.dg/template/koenig4.C: New test. PR c++/13968 * g++.dg/template/crash17.C: New test. PR c++/13975 * g++.dg/parse/error13.C: New test. * g++.old-deja/g++.robertl/eb125.C: Tweak error messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77176 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 1348b5095e3..2857468f20f 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -6506,6 +6506,9 @@ cp_parser_simple_declaration (cp_parser* parser,
cp_parser_error (parser, "expected `,' or `;'");
/* Skip tokens until we reach the end of the statement. */
cp_parser_skip_to_end_of_statement (parser);
+ /* If the next token is now a `;', consume it. */
+ if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON))
+ cp_lexer_consume_token (parser->lexer);
goto done;
}
/* After the first time around, a function-definition is not
OpenPOWER on IntegriCloud