Debian Codegraph @

gcc/testsuite/gcc.dg/c23-imaginary-constants-6.c

raw
1 /* Test that imaginary constants are diagnosed in C23 mode: -pedantic-errors. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c23 -pedantic-errors" } */
4 /* { dg-add-options float128 } */
5 /* { dg-require-effective-target float128 } */
6
7 _Complex _Float128 a = 1.if128; /* { dg-error "imaginary constants are a C2Y feature or GCC extension" } */
8 _Complex _Float128 b = 2.F128j; /* { dg-error "imaginary constants are a C2Y feature or GCC extension" } */
9 _Complex _Float128 c = 3.f128i; /* { dg-error "imaginary constants are a C2Y feature or GCC extension" } */
10 _Complex _Float128 d = 4.JF128; /* { dg-error "imaginary constants are a C2Y feature or GCC extension" } */
11 __extension__ _Complex _Float128 e = 1.if128;
12 __extension__ _Complex _Float128 f = 2.F128j;
13 __extension__ _Complex _Float128 g = 3.f128i;
14 __extension__ _Complex _Float128 h = 4.JF128;