OSDN Git Service

PR c++/6936
[pf3gnuchains/gcc-fork.git] / gcc / cp / parser.c
index fc8f3c8..23885b8 100644 (file)
@@ -13758,6 +13758,9 @@ cp_parser_nonclass_name (cp_parser* parser)
   /* Look up the type-name.  */
   type_decl = cp_parser_lookup_name_simple (parser, identifier, token->location);
 
+  /* If it is a using decl, use its underlying decl.  */
+  type_decl = strip_using_decl (type_decl);
+
   if (TREE_CODE (type_decl) != TYPE_DECL
       && (objc_is_id (identifier) || objc_is_class_name (identifier)))
     {