comparison gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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-warning "ignored" }
17 void two [[gnu::unused]] (void) {}
18
19
20
21 [[gnu::unused]]
22 int
23 five(void)
24 [[noreturn]] // { dg-warning "ignored" }
25 {}
26
27 [[noreturn]]
28 void
29 six (void)
30 ;