summaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-07 02:49:34 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-07 02:49:34 +0000
commit53b567c16985ce349d6bfb0ac087b00e1e96dddc (patch)
tree5227fce1bac62466fe47f51072fd44a5cf33a72a /gcc/cp/decl.c
parent556726e1625aaa01cff0323ed058daeeb12e980a (diff)
downloadgcc-53b567c16985ce349d6bfb0ac087b00e1e96dddc.tar.gz
* decl.c (grokdeclarator): Keep a decl with error type.
(grokfield, grokbitfield): Likewise. * pt.c (instantiate_class_template_1): Likewise. (tsubst_decl): Drop redundant error. * class.c (walk_subobject_offsets): Handle erroneous fields. * typeck2.c (process_init_constructor_record): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199779 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index c37b4fe5592..7825c73e0d7 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -10530,21 +10530,13 @@ grokdeclarator (const cp_declarator *declarator,
&& (TREE_CODE (type) != ARRAY_TYPE || initialized == 0))
{
if (unqualified_id)
- error ("field %qD has incomplete type", unqualified_id);
+ error ("field %qD has incomplete type %qT",
+ unqualified_id, type);
else
error ("name %qT has incomplete type", type);
- /* If we're instantiating a template, tell them which
- instantiation made the field's type be incomplete. */
- if (current_class_type
- && TYPE_NAME (current_class_type)
- && IDENTIFIER_TEMPLATE (current_class_name)
- && declspecs->type
- && declspecs->type == type)
- error (" in instantiation of template %qT",
- current_class_type);
-
- return error_mark_node;
+ type = error_mark_node;
+ decl = NULL_TREE;
}
else
{