Debian Codegraph @

gcc/testsuite/gcc.dg/gnu23-tag-2.c

raw
1 /*
2 * { dg-do compile }
3 * { dg-options "-std=gnu23" }
4 */
5
6 // conflicting attributes
7
8 extern struct [[gnu::transaction_safe]] foo { int x; } x;
9 extern struct [[gnu::unused]] foo2 { int x; } x2;
10 extern struct [[gnu::may_alias]] foo3 { int x; } x3;
11
12 void test()
13 {
14 extern struct foo { int x; } x; /* { dg-error "conflicting types" } */
15 extern struct foo2 { int x; } x2;
16 extern struct foo3 { int x; } x3;
17 }
18