+2004-03-12 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Backport:
+ 2004-03-11 Mark Mitchell <mark@codesourcery.com>
+ PR c++/14476
+ * decl.c (xref_tag): Do not create dummy ENUMERAL_TYPEs.
+
2004-03-12 Gabriel Dos Reis <gdr@integrable-solutions.net>
Backport:
if (code == ENUMERAL_TYPE)
{
error ("use of enum `%#D' without previous declaration", name);
-
- ref = make_node (ENUMERAL_TYPE);
-
- /* Give the type a default layout like unsigned int
- to avoid crashing if it does not get defined. */
- TYPE_MODE (ref) = TYPE_MODE (unsigned_type_node);
- TYPE_ALIGN (ref) = TYPE_ALIGN (unsigned_type_node);
- TYPE_USER_ALIGN (ref) = 0;
- TREE_UNSIGNED (ref) = 1;
- TYPE_PRECISION (ref) = TYPE_PRECISION (unsigned_type_node);
- TYPE_MIN_VALUE (ref) = TYPE_MIN_VALUE (unsigned_type_node);
- TYPE_MAX_VALUE (ref) = TYPE_MAX_VALUE (unsigned_type_node);
-
- /* Enable us to recognize when a type is created in class context.
- To do nested classes correctly, this should probably be cleared
- out when we leave this classes scope. Currently this in only
- done in `start_enum'. */
-
- pushtag (name, ref, globalize);
+ POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, error_mark_node);
}
else
{