http://bugzilla.suse.com/show_bug.cgi?id=1169156
http://bugzilla.suse.com/show_bug.cgi?id=1169156#c5
--- Comment #5 from Petr Tesařík
You may also use '__builtin_constant_p' in initializers for static data. For instance, you can write
static const int table[] = { __builtin_constant_p (EXPRESSION) ? (EXPRESSION) : -1, /* ... */ };
This is an acceptable initializer even if EXPRESSION is not a constant expression, including the case where '__builtin_constant_p' returns 1 because EXPRESSION can be folded to a constant but EXPRESSION contains operands that are not otherwise permitted in a static initializer (for example, '0 && foo ()'). GCC must be more conservative about evaluating the built-in in this case, because it has no opportunity to perform optimization.
So, I beg to treat the current GCC9 behaviour as a bug. -- You are receiving this mail because: You are on the CC list for the bug.