]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/constexpr-46336.C
Regenerate riscv.opt.urls and i386.opt.urls
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-46336.C
CommitLineData
9f2a22d0 1// PR c++/46336
4b2e63de 2// { dg-do compile { target c++11 } }
9f2a22d0
JM
3
4extern "C" {
5 enum A { };
6 inline constexpr A
23644e8c 7 f(A a, A b) // { dg-message "previous declaration" }
9f2a22d0
JM
8 { return A(static_cast<int>(a) & static_cast<int>(b)); }
9 enum B { };
10 inline constexpr B
11 f(B a, B b) // { dg-error "C function" }
12 { return B(static_cast<int>(a) & static_cast<int>(b)); }
13}
14