(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
cpp0x/
gen-attrs-4.C
// { dg-options "-Wunused -pedantic-errors" }
// { dg-do compile { target c++11 } }
// Test for syntax support of various attribute permutations.

int
[[noreturn]] // { dg-warning "ignored" }
one
[[gnu::unused]]
(void);

int one_third [[noreturn]] [[gnu::unused]] (void);

int [[gnu::unused]] one_half(); // { dg-warning "ignored" }

static
[[noreturn]] // { dg-error "standard attributes in middle of decl-specifiers" }
// { dg-warning "attribute ignored" "" { target *-*-* } .-1 }
void two [[gnu::unused]] (void) {}



[[gnu::unused]]
int
five(void)
[[noreturn]] // { dg-warning "does not apply to types" }
{ return 0; }

[[noreturn]]
void
six (void)
;