https://issues.dlang.org/show_bug.cgi?id=23801
Issue ID: 23801
Summary: ImportC: enumeration constant does not fit in an int
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
The system library libdispatch on macOS has an enumeration constant that does
not fit in an int. It is more or less defined as so:
enum {
DISPATCH_WALLTIME_NOW = ~1ull,
};
C11 is clear on the subject - enumeration constants must fit in an int.
However, clang, gcc and likely other compilers accepted larger constants as an
extension.
Additionally, C23 has greatly changed the rules and so the above is now valid
when compiling with that standard.
--