digitalmars.D.bugs - [Issue 21659] New: [OSX] core.stdc.config.__c_ulonglong is forward
- d-bugmail puremagic.com (45/45) Feb 23 2021 https://issues.dlang.org/show_bug.cgi?id=21659
https://issues.dlang.org/show_bug.cgi?id=21659 Issue ID: 21659 Summary: [OSX] core.stdc.config.__c_ulonglong is forward referenced while looking for sizeof Product: D Version: D2 Hardware: All OS: Mac OS X Status: NEW Keywords: industry, rejects-valid Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: pro.mathias.lang gmail.com Compiling the following with the latest (v2.095.1) on OSX: ``` import core.stdc.inttypes; import std.bitmanip; void main () { uint64_t record; auto x = nativeToLittleEndian(record)[0 .. typeof(record).sizeof]; } ``` Will trigger the following error: ``` /usr/local/opt/dmd/include/dlang/dmd/core/stdc/config.d(121): Error: enum core.stdc.config.__c_ulonglong is forward referenced when looking for sizeof /usr/local/opt/dmd/include/dlang/dmd/std/bitmanip.d(2958): Error: template instance std.bitmanip.EndianSwapper!(__c_ulonglong) error instantiating /usr/local/opt/dmd/include/dlang/dmd/std/bitmanip.d(3092): instantiated from here: nativeToEndianImpl!(false, __c_ulonglong) reg.d(7): instantiated from here: nativeToLittleEndian!(__c_ulonglong) /usr/local/opt/dmd/include/dlang/dmd/core/stdc/config.d(121): Error: enum core.stdc.config.__c_ulonglong is forward referenced when looking for sizeof /usr/local/opt/dmd/include/dlang/dmd/std/bitmanip.d(2966): Error: template instance std.bitmanip.ctfeBytes!(__c_ulonglong) error instantiating /usr/local/opt/dmd/include/dlang/dmd/std/bitmanip.d(3092): instantiated from here: nativeToEndianImpl!(false, __c_ulonglong) reg.d(7): instantiated from here: nativeToLittleEndian!(__c_ulonglong) ``` However, it will work fine on Linux. This error appeared also on Linux in an release (v2.078 to v2.080) but was fixed. --
Feb 23 2021