* parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142056
138bc75d-0d04-0410-961f-
82ee72b054a4
2008-11-20 Jason Merrill <jason@redhat.com>
+ PR c++/28513
+ * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
+
PR c++/37540
* call.c (build_over_call): Take the address of the function even
in a template.
}
return error_mark_node;
}
+ else if (decl != error_mark_node
+ && !parser->scope)
+ maybe_note_name_used_in_class (identifier, decl);
}
}
else
2008-11-20 Jason Merrill <jason@redhat.com>
+ PR c++/28513
+ * g++.dg/lookup/name-clash7.C: New test.
+
PR c++/37540
* g++.dg/cpp0x/decltype14.C: New test.
--- /dev/null
+// PR c++/28513
+
+class foo { // { dg-error "changes meaning" }
+public:
+ typedef int bar;
+};
+
+class baz {
+public:
+ foo::bar foo; // { dg-error "declaration" }
+};