repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tree-optimization/116481 - avoid building function_type[]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-82304.C
blob
3b05243df25481d024f39f7801d2556521b2899d
1
// PR c++/82304
2
// { dg-do compile { target c++14 } }
3
4
typedef __UINTPTR_TYPE__ uintptr_t;
5
6
constexpr const char *
7
foo (const char *p)
8
{
9
auto l = reinterpret_cast<uintptr_t>(p); // { dg-error "conversion from pointer" }
10
++l;
11
return reinterpret_cast<const char *>(l);
12
}
13
14
constexpr auto s = foo ("Hello");