Changeset 97965 in vbox for trunk/include/iprt
- Timestamp:
- Jan 3, 2023 9:57:14 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/assertcompile.h
r97964 r97965 103 103 */ 104 104 #ifdef __GNUC__ 105 # ifdef __cplusplus 106 # define AssertCompileNS(expr) extern "C" int RTASSERTVAR[1] __attribute__((__unused__)), RTASSERTVAR[(expr) ? 1 : 0] __attribute__((__unused__)) 105 # ifdef __cplusplus /* Hack alert! Some GCC versions and clang gets upset when the macro is used both inside and outside 106 extern "C". So, making the variable a bit more unique by appending the line number. */ 107 # define AssertCompileNS(expr) extern int RT_CONCAT(RTASSERTVAR,__LINE__)[1] __attribute__((__unused__)), \ 108 RT_CONCAT(RTASSERTVAR,__LINE__)[(expr) ? 1 : 0] __attribute__((__unused__)) 107 109 # else 108 110 # define AssertCompileNS(expr) extern int RTASSERTVAR[1] __attribute__((__unused__)), RTASSERTVAR[(expr) ? 1 : 0] __attribute__((__unused__))
Note:
See TracChangeset
for help on using the changeset viewer.