================ @@ -125,3 +125,7 @@ struct XY { int before; struct XX xx, *xp; float* after; } xy[] = { 0, // all-warning {{initializer overrides prior initialization of this subobject}} &xy[2].xx.a, &xy[2].xx, &global_float }; + +const int A = ((_Complex double)1.0 ? 21 : 1); +_Static_assert(A == 21, ""); // pedantic-ref-warning {{GNU extension}} \ + // pedantic-expected-warning {{GNU extension}} ---------------- sethp wrote:
Some other test cases that might be interesting: ```C const int foo = (__builtin_complex(0.0, 1.0)); const _Bool bar = (_Bool)(__builtin_complex(0.0, 1.0)); const _Bool baz = __builtin_complex(0.0, 1.0); ``` gcc (but not clang) seems to think `baz` ought not produce a constant value: https://godbolt.org/z/TEYWzzK7c https://github.com/llvm/llvm-project/pull/79452 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits