1 // { dg-do compile { target c++11 } }
2 // { dg-options "-pedantic" }
3 
4 namespace ns { typedef int T; }
5 
Test1(int x)6 constexpr int Test1(int x) { using ns::T; typedef T U; return U(x); }
Test2(int x)7 constexpr int Test2(int x) { using namespace ns; typedef T U; return U(x); }
Test3(int x)8 constexpr int Test3(int x) { { using ns::T; typedef T U; return U(x); } }  // { dg-warning "compound-statement" "" { target { c++11_only } } }
Test4(int x)9 constexpr int Test4(int x) { { using namespace ns; typedef T U; return T(x); } }  // { dg-warning "compound-statement" "" { target { c++11_only } } }
10 
11 struct S1
12 {
S1S113   constexpr S1() { using ns::T; typedef T U; }
14 };
15 
16 struct S2
17 {
S2S218   constexpr S2() { using namespace ns; typedef T U; }
19 };
20 
21 struct S3
22 {
S3S323   constexpr S3() { { using ns::T; typedef T U; } }  // { dg-warning "compound-statement" "" { target { c++11_only } } }
24 };
25 
26 struct S4
27 {
S4S428   constexpr S4() { { using namespace ns; typedef T U; } }  // { dg-warning "compound-statement" "" { target { c++11_only } } }
29 };
30