1 // { dg-do compile { target c++11 } }
2 // { dg-options "-pedantic" }
4 namespace ns { typedef int T; }
6 constexpr int Test1(int x) { using ns::T; typedef T U; return U(x); }
7 constexpr int Test2(int x) { using namespace ns; typedef T U; return U(x); }
8 constexpr int Test3(int x) { { using ns::T; typedef T U; return U(x); } } // { dg-warning "compound-statement" "" { target { c++11_only } } }
9 constexpr int Test4(int x) { { using namespace ns; typedef T U; return T(x); } } // { dg-warning "compound-statement" "" { target { c++11_only } } }
13 constexpr S1() { using ns::T; typedef T U; }
18 constexpr S2() { using namespace ns; typedef T U; }
23 constexpr S3() { { using ns::T; typedef T U; } } // { dg-warning "compound-statement" "" { target { c++11_only } } }
28 constexpr S4() { { using namespace ns; typedef T U; } } // { dg-warning "compound-statement" "" { target { c++11_only } } }