aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-01-08 15:00:17 -0500
committerJason Merrill <jason@gcc.gnu.org>2003-01-08 15:00:17 -0500
commitf74dbcece05f1d1b02508b03d5c24b62ea590296 (patch)
treeccec028dce7693df778d697a8060ac15c38a4f20 /gcc/cp
parent2d2a50c30a15483b59b9bba68c6117cc67896389 (diff)
downloadgcc-f74dbcece05f1d1b02508b03d5c24b62ea590296.zip
gcc-f74dbcece05f1d1b02508b03d5c24b62ea590296.tar.gz
gcc-f74dbcece05f1d1b02508b03d5c24b62ea590296.tar.bz2
parser.c (cp_parser_primary_expression): See through explicitly scoped ALIAS_DECLs, too.
* parser.c (cp_parser_primary_expression): See through explicitly scoped ALIAS_DECLs, too. From-SVN: r61054
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/parser.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3435016..2376d13 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-08 Jason Merrill <jason@redhat.com>
+
+ * parser.c (cp_parser_primary_expression): See through explicitly
+ scoped ALIAS_DECLs, too.
+
2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
* decl.c: ANSIfy function declarations.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index f5ada05..e88045d 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -3023,14 +3023,15 @@ cp_parser_primary_expression (cp_parser *parser,
if (TREE_CODE (decl) == FIELD_DECL || BASELINK_P (decl))
*qualifying_class = parser->scope;
}
- /* Resolve references to variables of anonymous unions
- into COMPONENT_REFs. */
- else if (TREE_CODE (decl) == ALIAS_DECL)
- decl = DECL_INITIAL (decl);
else
/* Transform references to non-static data members into
COMPONENT_REFs. */
decl = hack_identifier (decl, id_expression);
+
+ /* Resolve references to variables of anonymous unions
+ into COMPONENT_REFs. */
+ if (TREE_CODE (decl) == ALIAS_DECL)
+ decl = DECL_INITIAL (decl);
}
if (TREE_DEPRECATED (decl))