We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a83bc0f commit 23b8308Copy full SHA for 23b8308
vmmon-only/include/vm_asm_x86.h
@@ -61,12 +61,15 @@
61
* ASSERT_ON_COMPILE(sizeof(Selector) == 2 && \
62
* ((__builtin_constant_p(expr) ? ((expr) >> 16) == 0) \
63
* : sizeof(expr) <= 2)
64
+ * The __builtin_choose_expr is due to GCC bug 79482:
65
+ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79482
66
*/
67
#ifndef USE_UBSAN
68
#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr) \
69
ASSERT_ON_COMPILE(sizeof(Selector) == 2 && \
- ((__builtin_constant_p(expr) && ((expr) >> 16) == 0) || \
- sizeof(expr) <= 2))
70
+ __builtin_choose_expr(__builtin_constant_p(expr), \
71
+ ((expr) >> 16) == 0, \
72
+ sizeof(expr) <= 2))
73
#else
74
#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr)
75
#endif
0 commit comments