aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2003-02-18 13:16:19 -0500
committerJason Merrill <jason@gcc.gnu.org>2003-02-18 13:16:19 -0500
commita6bd211dbfba9b5e31d52f68ee5fc1ef58520117 (patch)
tree81a1b4b60ed4574ed1a998136dc6fce17a5bd410 /gcc/cp/parser.c
parentbc102c4bd54702a5503c4f1476b8133bebed4fb1 (diff)
downloadgcc-a6bd211dbfba9b5e31d52f68ee5fc1ef58520117.zip
gcc-a6bd211dbfba9b5e31d52f68ee5fc1ef58520117.tar.gz
gcc-a6bd211dbfba9b5e31d52f68ee5fc1ef58520117.tar.bz2
re PR c++/9623 (named initializer regression)
PR c++/9623 * decl.c (reshape_init): Don't mess with initializer labels. [[Split portion of a mixed commit.]] From-SVN: r63044.2
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index fab1ef4..c81c3df 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -4031,6 +4031,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p)
parser->scope = NULL_TREE;
parser->qualifying_scope = NULL_TREE;
parser->object_scope = NULL_TREE;
+ idk = CP_PARSER_ID_KIND_NONE;
/* Enter the scope corresponding to the type of the object
given by the POSTFIX_EXPRESSION. */
if (!dependent_p
@@ -4095,6 +4096,12 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p)
Even though "t" is dependent, "X::f" is not and has
except that for a BASELINK there is no need to
include scope information. */
+
+ /* But we do need to remember that there was an explicit
+ scope for virtual function calls. */
+ if (parser->scope)
+ idk = CP_PARSER_ID_KIND_QUALIFIED;
+
if (name != error_mark_node
&& !BASELINK_P (name)
&& parser->scope)
@@ -4125,7 +4132,6 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p)
object on the left-hand side of the `.' or `->'
operator. */
parser->context->object_type = NULL_TREE;
- idk = CP_PARSER_ID_KIND_NONE;
}
break;