Debian Codegraph @

gcc/testsuite/gcc.dg/c23-qual-7.c

raw
1 /* Tests related to qualifiers and pointers to arrays in C23, PR98397 */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c23 -pedantic-errors" } */
4
5 /* test that _Atomic qualifier is not preserved in tertiary operator for pointers to arrays in C23 */
6
7 void f(void)
8 {
9 _Atomic void *u;
10 void *v;
11 _Static_assert(_Generic(1 ? u : v, _Atomic void*: 0, void*: 1), "_Atomic should be removed");
12 _Static_assert(_Generic(1 ? v : u, _Atomic void*: 0, void*: 1), "_Atomic should be removed");
13 }
14
15
16