summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-11-21 01:33:56 -0500
committerJason Merrill <jason@gcc.gnu.org>2009-11-21 01:33:56 -0500
commitabd5730b2df531b752b1447e05f1c947f5ecdeb2 (patch)
tree7f4536668ed93e9f54f2a097d69e1d19bbdfd521 /gcc/cp/error.c
parent42a06e46ab05b7cf751579a50ee302a8ab6b9cae (diff)
downloadgcc-abd5730b2df531b752b1447e05f1c947f5ecdeb2.tar.gz
PR c++/9050, DR 147, DR 318
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. From-SVN: r154403
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index a424299627e..e0e5ae52ceb 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -568,10 +568,11 @@ dump_aggr_type (tree t, int flags)
{
typdef = !DECL_ARTIFICIAL (name);
- if (typdef
- && ((flags & TFF_CHASE_TYPEDEF)
- || (!flag_pretty_templates && DECL_LANG_SPECIFIC (name)
- && DECL_TEMPLATE_INFO (name))))
+ if ((typdef
+ && ((flags & TFF_CHASE_TYPEDEF)
+ || (!flag_pretty_templates && DECL_LANG_SPECIFIC (name)
+ && DECL_TEMPLATE_INFO (name))))
+ || DECL_SELF_REFERENCE_P (name))
{
t = TYPE_MAIN_VARIANT (t);
name = TYPE_NAME (t);