extern(C) enum
nkm1 via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Sep 15 19:35:50 UTC 2017
On Friday, 15 September 2017 at 19:21:02 UTC, Timothy Foster
wrote:
> I believe C enum size is implementation defined. A C compiler
> can pick the underlying type (1, 2, or 4 bytes, signed or
> unsigned) that fits the values in the enum.
No, at least, not C99. See 6.4.4.3: "An identifier declared as an
enumeration constant has type int". You must be thinking about
C++.
More information about the Digitalmars-d-learn
mailing list