blob: 3b05243df25481d024f39f7801d2556521b2899d [file] [log] [blame]
// PR c++/82304
// { dg-do compile { target c++14 } }
typedef __UINTPTR_TYPE__ uintptr_t;
constexpr const char *
foo (const char *p)
{
auto l = reinterpret_cast<uintptr_t>(p); // { dg-error "conversion from pointer" }
++l;
return reinterpret_cast<const char *>(l);
}
constexpr auto s = foo ("Hello");