annotate gcc/testsuite/g++.dg/cpp0x/constexpr-using3.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 // { dg-do compile { target c++11 } }
kono
parents:
diff changeset
2 // { dg-options "-pedantic" }
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 namespace ns { typedef int T; }
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 constexpr int Test1(int x) { using ns::T; typedef T U; return U(x); }
kono
parents:
diff changeset
7 constexpr int Test2(int x) { using namespace ns; typedef T U; return U(x); }
kono
parents:
diff changeset
8 constexpr int Test3(int x) { { using ns::T; typedef T U; return U(x); } } // { dg-warning "compound-statement" "" { target { c++11_only } } }
kono
parents:
diff changeset
9 constexpr int Test4(int x) { { using namespace ns; typedef T U; return T(x); } } // { dg-warning "compound-statement" "" { target { c++11_only } } }
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 struct S1
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 constexpr S1() { using ns::T; typedef T U; }
kono
parents:
diff changeset
14 };
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 struct S2
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 constexpr S2() { using namespace ns; typedef T U; }
kono
parents:
diff changeset
19 };
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 struct S3
kono
parents:
diff changeset
22 {
kono
parents:
diff changeset
23 constexpr S3() { { using ns::T; typedef T U; } } // { dg-warning "compound-statement" "" { target { c++11_only } } }
kono
parents:
diff changeset
24 };
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 struct S4
kono
parents:
diff changeset
27 {
kono
parents:
diff changeset
28 constexpr S4() { { using namespace ns; typedef T U; } } // { dg-warning "compound-statement" "" { target { c++11_only } } }
kono
parents:
diff changeset
29 };