Commit a6bf9022 by Jason Merrill Committed by Jason Merrill

re PR c++/28513 (QOI: Diagnostic missing since 3.3.x when naming rule is violated)

        PR c++/28513
        * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.

From-SVN: r142056
parent c7962e7d
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.
......
......@@ -14767,6 +14767,9 @@ cp_parser_class_name (cp_parser *parser,
}
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.
......
// PR c++/28513
class foo { // { dg-error "changes meaning" }
public:
typedef int bar;
};
class baz {
public:
foo::bar foo; // { dg-error "declaration" }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment