| 1 |
// Testcase from P0292R2 |
| 2 |
// { dg-do link { target c++11 } } |
| 3 |
// { dg-options "" } |
| 4 |
|
| 5 |
extern int x; // no definition of x required |
| 6 |
int main() { |
| 7 |
if constexpr (true) // { dg-warning "constexpr" "" { target c++14_down } } |
| 8 |
return 0; |
| 9 |
else if (x) |
| 10 |
return x; |
| 11 |
else |
| 12 |
return -x; |
| 13 |
} |