[gnu.gcc.bug] GCC 1.36 does not report enumeration constants that are too large

eggert@twinsun.com (Paul Eggert) (02/07/90)

GCC 1.36 (SPARCstation 1, SunOS 4.0.3c) compiles and runs the following program
without complaint; main() surprisingly yields 0.

	enum {NEG = -1, POS = 4294967295} neg = NEG, pos = POS;
	main() { return (neg < pos) == (NEG < POS); }

GCC should report an error, because the constant 4294967295 violates ANSI C
3.5.2.2's constraint ``The expression that defines the value of an enumeration
constant shall be an integral constant expression that has a value
representable as an int.''

It might also be nice (although not required) for GCC to report the overflow in
the enumeration specifier

	enum {X = 2147483647, X_PLUS_1}