Debian Codegraph @

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

raw
1 // { dg-do compile { target c++14 } }
2 // { dg-additional-options "-Wno-return-type" }
3
4 constexpr int f (int i)
5 {
6 if (i == -1) return 0;
7 }
8
9 constexpr int i = f(42); // { dg-error "flows off the end|in .constexpr. expansion of " }