aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorFabien ChĂȘne <fabien@gcc.gnu.org>2014-02-02 21:02:37 +0100
committerFabien ChĂȘne <fabien@gcc.gnu.org>2014-02-02 21:02:37 +0100
commit1c50676a2038834136ff6569f96ed0bda2a9a09c (patch)
treeb5cd3b5b66192646a47ac9095f2196b774f7fca6 /gcc/cp/parser.c
parent7f82286eb63dadda3412c05f9ca7dd8e10ebaea5 (diff)
downloadgcc-1c50676a2038834136ff6569f96ed0bda2a9a09c.zip
gcc-1c50676a2038834136ff6569f96ed0bda2a9a09c.tar.gz
gcc-1c50676a2038834136ff6569f96ed0bda2a9a09c.tar.bz2
re PR c++/37140 (type inherited from base class not recognized)
2014-02-02 Fabien Chene <fabien@gcc.gnu.org> PR c++/37140 * parser.c (cp_parser_nonclass_name): Call strip_using_decl and move the code handling dependent USING_DECLs... * name-lookup.c (strip_using_decl): ...Here. 2014-02-02 Fabien Chene <fabien@gcc.gnu.org> PR c++/37140 * g++.dg/template/using27.C: New. * g++.dg/template/using28.C: New. * g++.dg/template/using29.C: New. From-SVN: r207408
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index a53597d..57001c6 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -14812,25 +14812,7 @@ cp_parser_nonclass_name (cp_parser* parser)
/* Look up the type-name. */
type_decl = cp_parser_lookup_name_simple (parser, identifier, token->location);
- if (TREE_CODE (type_decl) == USING_DECL)
- {
- if (!DECL_DEPENDENT_P (type_decl))
- type_decl = strip_using_decl (type_decl);
- else if (USING_DECL_TYPENAME_P (type_decl))
- {
- /* We have found a type introduced by a using
- declaration at class scope that refers to a dependent
- type.
-
- using typename :: [opt] nested-name-specifier unqualified-id ;
- */
- type_decl = make_typename_type (TREE_TYPE (type_decl),
- DECL_NAME (type_decl),
- typename_type, tf_error);
- if (type_decl != error_mark_node)
- type_decl = TYPE_NAME (type_decl);
- }
- }
+ type_decl = strip_using_decl (type_decl);
if (TREE_CODE (type_decl) != TYPE_DECL
&& (objc_is_id (identifier) || objc_is_class_name (identifier)))