------- Comment #6 from sabre at nondot dot org 2008-12-12 18:02 ------- Here are the testcases I checked in with the clang implementation of this if you're interested:
// __builtin_constant_p as the condition of ?: allows arbitrary foldable // constants to be transmogrified into i-c-e's. char b[__builtin_constant_p((int)(1.0+2.0)) ? (int)(1.0+2.0) : -1]; struct c { int a : ( // expected-error {{expression is not an integer constant expression}} __builtin_constant_p((int)(1.0+2.0)) ? (int)(1.0+ expr // expected-note {{subexpression not valid in an integer constant expression}} ) : -1); }; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38377