annotate gcc/testsuite/g++.dg/cpp0x/constexpr-type-def1.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // PR c++/55250
kono
parents:
diff changeset
2 // { dg-do compile { target c++11 } }
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 constexpr int Test1(int x) { enum E { y = 1 }; return x; } // { dg-error "not a return-statement" "" { target { c++11_only } } }
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 constexpr int Test2(int x) { struct T { }; return x; } // { dg-error "not a return-statement" "" { target { c++11_only } } }
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 constexpr int Test3(int x) { typedef enum E { y = 1 } EE; return x; } // { dg-error "not a return-statement" "" { target { c++11_only } } }
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 constexpr int Test4(int x) { typedef struct T { } TT; return x; } // { dg-error "not a return-statement" "" { target { c++11_only } } }
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 constexpr int Test5(int x) { using EE = enum E { y = 1 }; return x; } // { dg-error "not a return-statement" "" { target { c++11_only } } }
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 constexpr int Test6(int x) { using TT = struct T { }; return x; } // { dg-error "not a return-statement" "" { target { c++11_only } } }
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 struct S1
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 constexpr S1() { enum E { y = 1 }; } // { dg-error "does not have empty body" "" { target { c++11_only } } }
kono
parents:
diff changeset
19 };
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 struct S2
kono
parents:
diff changeset
22 {
kono
parents:
diff changeset
23 constexpr S2() { struct T { }; } // { dg-error "does not have empty body" "" { target { c++11_only } } }
kono
parents:
diff changeset
24 };
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 struct S3
kono
parents:
diff changeset
27 {
kono
parents:
diff changeset
28 constexpr S3() { typedef enum E { y = 1 } EE; } // { dg-error "does not have empty body" "" { target { c++11_only } } }
kono
parents:
diff changeset
29 };
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 struct S4
kono
parents:
diff changeset
32 {
kono
parents:
diff changeset
33 constexpr S4() { typedef struct T { } TT; } // { dg-error "does not have empty body" "" { target { c++11_only } } }
kono
parents:
diff changeset
34 };
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 struct S5
kono
parents:
diff changeset
37 {
kono
parents:
diff changeset
38 constexpr S5() { using EE = enum E { y = 1 }; } // { dg-error "does not have empty body" "" { target { c++11_only } } }
kono
parents:
diff changeset
39 };
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 struct S6
kono
parents:
diff changeset
42 {
kono
parents:
diff changeset
43 constexpr S6() { using TT = struct T { }; } // { dg-error "does not have empty body" "" { target { c++11_only } } }
kono
parents:
diff changeset
44 };