daltenty wrote:

>> I'm not sure exactly which provider's <endian.h> this expects, but if it can 
>> be reasonable that this header provides these defines with leading 
>> underscores too, would it be reasonable to make it do that?

Yeah, there appear to be similar usages in LLVM itself: 
https://github.com/llvm/llvm-project/blob/989ea0e2d7263dc462f600a2c65be95a60007cde/compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp#L45

The shape of existing usages makes me suspect a GNU extension

> That does seem to be allowed by the POSIX spec too 
> (https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/endian.h.html). 
> Implementations may define other macros with the _ENDIAN suffix.


I think this sounds reasonable, I'll put up a follow on change

https://github.com/llvm/llvm-project/pull/186032
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to