]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tm/attrs-1.c
1 /* Test various erroneous or ignored uses of C23 attribute syntax. */
2 /* { dg-do compile } */
3 /* { dg-options "-fgnu-tm" } */
8 __transaction_atomic
[[ outer ()]] {} /* { dg-error "does not take any arguments" } */
14 __transaction_atomic
[[ not_a_tm_attribute
]] {} /* { dg-warning "attribute directive ignored" } */
20 __transaction_atomic
[[ unknown_attribute ( args of
* unknown
* attributes need
only ( be
{ balanced
[(({{[[]]}}))]}!), as per standard C
)]] {} /* { dg-warning "attribute directive ignored" } */
26 __transaction_atomic
[[ gnu :: const ]] {} /* { dg-warning "attribute directive ignored" } */
32 __transaction_atomic
[[ bad_namespace :: outer
]] {} /* { dg-warning "attribute directive ignored" } */
38 __transaction_atomic
[[ outer
, outer
]] {} /* { dg-warning "attribute duplicated" } */