OSDN Git Service

PR c++/13950, DR 176
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Nov 2009 23:29:25 +0000 (23:29 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Nov 2009 23:29:25 +0000 (23:29 +0000)
commit6dd3a38d06b493341de6a1bd307fa66b8a10462d
treed01fd61cab03b29407d10ef9f75bd71d4bae928a
parente01b36b0e51501e657b27828a99f8940ce52aee4
PR c++/13950, DR 176
* search.c (lookup_field_r): Allow lookup to find the
injected-class-name from a template base.
(template_self_reference_p): Remove.
* decl.c (make_typename_type): Diagnose ambiguity.  Use
maybe_get_template_decl_from_type_decl.
* parser.c (cp_parser_template_name): Pass true to is_template
rather than use maybe_get_template_decl_from_type_decl.
(cp_parser_lookup_name): Use maybe_get_template_decl_from_type_decl.
* pt.c (maybe_get_template_decl_from_type_decl): Handle ambiguity.
Use DECL_SELF_REFERENCE_P.

* parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
Avoid duplicate ambiguity error.
* error.c (dump_decl): Don't say "typedef" for injected-class-name.
* pt.c (convert_template_argument): Tweak logic.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154223 138bc75d-0d04-0410-961f-82ee72b054a4
13 files changed:
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/error.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/search.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/inherit.C
gcc/testsuite/g++.dg/template/injected1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.brendan/crash56.C
gcc/testsuite/g++.old-deja/g++.pt/lookup8.C
gcc/testsuite/g++.old-deja/g++.pt/ttp22.C
gcc/testsuite/g++.old-deja/g++.pt/ttp23.C