Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C

raw
1 // { dg-options "-Wunused -pedantic-errors" }
2 // { dg-do compile { target c++11 } }
3 // Test for syntax support of various attribute permutations.
4
5 int
6 [[noreturn]] // { dg-warning "ignored" }
7 one
8 [[gnu::unused]]
9 (void);
10
11 int one_third [[noreturn]] [[gnu::unused]] (void);
12
13 int [[gnu::unused]] one_half(); // { dg-warning "ignored" }
14
15 static
16 [[noreturn]] // { dg-error "standard attributes in middle of decl-specifiers" }
17 // { dg-warning "attribute ignored" "" { target *-*-* } .-1 }
18 void two [[gnu::unused]] (void) {}
19
20
21
22 [[gnu::unused]]
23 int
24 five(void)
25 [[noreturn]] // { dg-warning "does not apply to types" }
26 { return 0; }
27
28 [[noreturn]]
29 void
30 six (void)
31 ;