summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C
blob: 023d83967774070cd3fa63f273c6825cc3b1e05e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// { 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-warning "ignored" }
void two [[gnu::unused]] (void) {}



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

[[noreturn]]
void
six (void)
;