[Issue 23801] New: ImportC: enumeration constant does not fit in an int
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 22 22:31:53 UTC 2023
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: nobody at puremagic.com
Reporter: dave287091 at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list