You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: be more flexible about anonymous enumeration imports
This test ensures that we correctly translate the anonymous enumeration
value. However, this is an odd case within the specification.
C11 6.7.2.2p2:
"The expression that defines the value of an enumeration constant shall
be an integer constant expression that has a value representable as an
`int`."
C11 6.7.2.2p4:
"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."
C11 6.7.2.2p3:
"The identifiers in an enumerator list are declared as constants that
have type `int` and may appear wherever such are permitted."
Because the enumeration is anonymous, the value could never be written
as spelled. This type is imported as an `int` on Windows as per the ABI
and as an `unsigned long` on LP64 targets.
0 commit comments