tree-optimization/116481 - avoid building function_type[]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / constexpr-82304.C
blob3b05243df25481d024f39f7801d2556521b2899d
1 // PR c++/82304
2 // { dg-do compile { target c++14 } }
4 typedef __UINTPTR_TYPE__ uintptr_t;
6 constexpr const char *
7 foo (const char *p)
9   auto l = reinterpret_cast<uintptr_t>(p);      // { dg-error "conversion from pointer" }
10   ++l;
11   return reinterpret_cast<const char *>(l);
14 constexpr auto s = foo ("Hello");