Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/constexpr-96182.C

raw
1 // PR c++/96182
2 // { dg-do compile { target c++11 } }
3
4 constexpr int foo () {} // { dg-error "no return statement in 'constexpr' function returning non-void" "" { target c++14 } }
5 // { dg-error "body of 'constexpr' function 'constexpr int foo\\\(\\\)' not a return-statement" "" { target c++11_only } .-1 }
6 // { dg-warning "no return statement in function returning non-void" "" { target c++11_only } .-2 }