diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-11 03:24:33 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-11 03:24:33 +0000 |
commit | b8a076926fc34244fbc6021fefa2908e71904c3c (patch) | |
tree | fe8b2af8964b498a3cfd237e8fc13295dd11510a /gcc/cp/parser.c | |
parent | 8d9f686bce4d7d8c80e00fe70849d84779c33439 (diff) | |
download | gcc-b8a076926fc34244fbc6021fefa2908e71904c3c.tar.gz |
PR c++/28999
* decl.c (make_typename_type): If the qualified name is not a
type, issue an error.
* parser.c (cp_parser_elaborated_type_specifier): Fix comment
formatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120663 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 82cb7969858..8183913f47c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -6093,6 +6093,7 @@ cp_parser_constant_expression (cp_parser* parser, parser->integral_constant_expression_p = true; parser->allow_non_integral_constant_expression_p = allow_non_constant_p; parser->non_integral_constant_expression_p = false; + integral_constant_expr_p = true; /* Although the grammar says "conditional-expression", we parse an "assignment-expression", which also permits "throw-expression" and the use of assignment operators. In the case that @@ -6104,6 +6105,7 @@ cp_parser_constant_expression (cp_parser* parser, constant. */ expression = cp_parser_assignment_expression (parser, /*cast_p=*/false); /* Restore the old settings. */ + integral_constant_expr_p = false; parser->integral_constant_expression_p = saved_integral_constant_expression_p; parser->allow_non_integral_constant_expression_p @@ -10311,8 +10313,8 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, /*check_dependency_p=*/true, /*type_p=*/true, is_declaration); - /* For everything but enumeration types, consider a template-id. */ - /* For an enumeration type, consider only a plain identifier. */ + /* For everything but enumeration types, consider a template-id. + For an enumeration type, consider only a plain identifier. */ if (tag_type != enum_type) { bool template_p = false; |