[Issue 22665] ImportC: enums are not "implicitly converting" to their own type.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 13 07:25:18 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22665

--- Comment #2 from dave287091 at gmail.com ---
(In reply to Walter Bright from comment #1)
> The trouble here is that in C11, 6.7.2.2-3 says "The identifiers in an
> enumerator list are declared as constants that have type int". I'll see what
> I can do.

6.7.2.4 specifies that "Each enumerated type shall be compatible with char, a
signed integer type, or an unsigned integer type. The choice of type is
implementation-defined) but shall be capable of representing the values of all
the members of the enumeration.”, so the value will always fit.

--


More information about the Digitalmars-d-bugs mailing list