+2004-12-23 Richard Henderson <rth@redhat.com>
+
+ PR c/18282
+ * c-decl.c (finish_enum): Retain precision acquired from an attribute.
+
2004-12-23 Alexandre Oliva <aoliva@redhat.com>
PR target/16819
TYPE_MIN_VALUE (enumtype) = minnode;
TYPE_MAX_VALUE (enumtype) = maxnode;
- TYPE_PRECISION (enumtype) = precision;
TREE_UNSIGNED (enumtype) = unsign;
TYPE_SIZE (enumtype) = 0;
+
+ /* If the precision of the type was specific with an attribute and it
+ was too small, give an error. Otherwise, use it. */
+ if (TYPE_PRECISION (enumtype))
+ {
+ if (precision > TYPE_PRECISION (enumtype))
+ error ("specified mode too small for enumeral values");
+ }
+ else
+ TYPE_PRECISION (enumtype) = precision;
+
layout_type (enumtype);
if (values != error_mark_node)