gcc/testsuite/g++.dg/cpp0x/constexpr-89599.C
raw| 1 | // PR c++/89599 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | void foo (int x) {} |
| 5 | constexpr void *arr[2] = { (void*) &foo, (void *) foo };// { dg-error "'reinterpret_cast' is not a constant expression" } |
| 6 | constexpr void *ptr = (void *) &foo; // { dg-error "'reinterpret_cast' is not a constant expression" } |