PR c++/9050, DR 147, DR 318
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 21 Nov 2009 06:33:56 +0000 (06:33 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 21 Nov 2009 06:33:56 +0000 (06:33 +0000)
commita70e3c3713fd1842877aff8717d9f89096b34f85
tree7f4536668ed93e9f54f2a097d69e1d19bbdfd521
parent43e54ec3e93dd2ef495375ead1f1eac467a727d1
PR c++/9050, DR 147, DR 318
* parser.c (cp_parser_lookup_name): If the name matches the explicit
class scope, we're naming the constructor.
(cp_parser_constructor_declarator_p): Just use cp_parser_unqualified_id
if we have a nested-name-specifier.
(cp_parser_direct_declarator): Handle getting an overload set as a
constructor declarator.
(cp_parser_unqualified_id): Avoid looking up the constructor when
naming the destructor.
(cp_parser_diagnose_invalid_type_name): Give good
diagnostic for improper use of constructor as template.
* typeck.c (finish_class_member_access_expr): Give good diagnostic
about calling constructor.

* error.c (dump_aggr_type): Don't print A::A for injected-class-name.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154403 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/error.c
gcc/cp/parser.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/name-clash4.C
gcc/testsuite/g++.dg/tc1/dr147.C
gcc/testsuite/g++.dg/template/ctor9.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.jason/temporary5.C
gcc/testsuite/g++.old-deja/g++.pt/ctor2.C