diff options
author | Jason Merrill <jason@redhat.com> | 2009-11-16 18:29:25 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-11-16 18:29:25 -0500 |
commit | 5a080ad7b0dc031e2b2c7f49fdb0ebf7d3d35514 (patch) | |
tree | d01fd61cab03b29407d10ef9f75bd71d4bae928a /gcc/cp/error.c | |
parent | 87213cd4965fb065bf1e57f6acd34df1695fedc0 (diff) | |
download | gcc-5a080ad7b0dc031e2b2c7f49fdb0ebf7d3d35514.tar.gz |
PR c++/13950, DR 176
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.
From-SVN: r154223
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index f4232075119..7266d8872d5 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -908,7 +908,8 @@ dump_decl (tree t, int flags) dump_type (TREE_TYPE (t), flags); break; } - if (flags & TFF_DECL_SPECIFIERS) + if ((flags & TFF_DECL_SPECIFIERS) + && !DECL_SELF_REFERENCE_P (t)) pp_cxx_ws_string (cxx_pp, "typedef"); dump_simple_decl (t, DECL_ORIGINAL_TYPE (t) ? DECL_ORIGINAL_TYPE (t) : TREE_TYPE (t), |