Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/Wattributes-4.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 // PR c++/83322 - ICE: tree check: expected class ‘type’, have ‘exceptional’ | |
2 // (baselink) in diag_attr_exclusions, at attribs.c:393 | |
3 // { dg-do compile } | |
4 // { dg-options "-Wattributes" } | |
5 | |
6 #define ATTR(list) __attribute__ (list) | |
7 | |
8 // Test case from comment #0. | |
9 struct A0 | |
10 { | |
11 template <class T> operator T(); | |
12 ATTR ((always_inline)) operator int(); | |
13 }; | |
14 | |
15 // Test case from comment #4. | |
16 struct A1 | |
17 { | |
18 void foo(); | |
19 }; | |
20 | |
21 struct B | |
22 { | |
23 bool foo; | |
24 }; | |
25 | |
26 struct C: A1, B | |
27 { | |
28 ATTR ((warn_unused_result)) int foo (); | |
29 }; |