From e857ea62d4e2c9a8485ee17c77df8a9fece13e82 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 24 May 2011 17:33:22 +0000 Subject: [PATCH] decl.c (grokdeclarator): Use current_class_name. 2011-05-24 Paolo Carlini * decl.c (grokdeclarator): Use current_class_name. From-SVN: r174125 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/decl.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8c47e0f98cc..351b07260eb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2011-05-24 Paolo Carlini + + * decl.c (grokdeclarator): Use current_class_name. + 2011-05-24 Joseph Myers * Make-lang.in (GXX_OBJS): Remove prefix.o. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 234daafb8a1..d87a8372930 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9910,7 +9910,7 @@ grokdeclarator (const cp_declarator *declarator, instantiation made the field's type be incomplete. */ if (current_class_type && TYPE_NAME (current_class_type) - && IDENTIFIER_TEMPLATE (TYPE_IDENTIFIER (current_class_type)) + && IDENTIFIER_TEMPLATE (current_class_name) && declspecs->type && declspecs->type == type) error (" in instantiation of template %qT", -- 2.30.2