c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-noexcept4.C
blob0446069107d7f702da3f3ceb226e021f2b2c4fa9
1 // { dg-do compile { target c++11 } }
2 // We used to treat a call to a constexpr function as noexcept if
3 // the call was a constant expression.  We no longer do since
4 // c++/87603.
6 #define SA(X) static_assert(X,#X)
8 constexpr const int* f(const int *p) { return p; }
10 int main()
12   constexpr int i = 42;
13   SA(!noexcept(*f(&i)));
14   SA(!noexcept(f(&i)));