curious (but compatible)

James Jones jejones at mcrware.UUCP
Thu Feb 28 02:54:08 AEST 1991


Does it follow from p.58, lines 20-21 and p.62, lines 40-41 that if one
happens to know, for a particular implementation, which integral type a
particular enumerated type is compatible with, one could have the same
object to be declared both as the enumerated type and the integral type?
(Non-portable, of course, but it looks permissible.)

We suppose that one isn't falling afoul of other constraints on the number
of declarations, e.g.

	enum color {red, orange, yellow, green, blue, indigo, violet};

	enum color	c1;
	extern int	c1;	/* supposing that enum color is compatible with int */

Come to think of it, what should be the composite type constructed from
these two types?

	James Jones



More information about the Comp.std.c mailing list