Hi, this patch moves offsetof definition outside of the header guard in Clang stddef.h header. As a result, it will override any conflicting definition of this macro every time stddef.h is included.
On linux there is a conflicting definition in /usr/include/linux/sysdef.h, which, unlike Clang definition, is not a compile-time constant. Failing to override it with Clang definition breaks some code that otherwise (i.e. with GCC) compiles. This mimics GCC header behaviour which also redefines offsetof everytime it is included. Since this is a compiler header, we don't need #undef to override an earlier definition. Please review.
offsetof.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
