Both Clang and GCC always define BYTE_ORDER, so there is no need to test the byte order a million different ways.
Details
Details
- Reviewers
ldionne - Group Reviewers
Restricted Project - Commits
- rG0a97720d0197: [libc++] Assume that __BYTE_ORDER__ is always present
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM with suggestion applied.
libcxx/include/__config | ||
---|---|---|
428 | Can we do something like #ifndef __BYTE_ORDER__ #error "Your compiler doesn't seem to define __BYTE_ORDER__, which is required by libc++ to know the endianness of your target platform #endif This will catch any failure to satisfy our assumptions here. |
Can we do something like
This will catch any failure to satisfy our assumptions here.