| 1 |
// PR preprocessor/119391 |
| 2 |
// { dg-do preprocess } |
| 3 |
// { dg-options "" } |
| 4 |
|
| 5 |
#if (1 << 63) != -9223372036854775807 - 1 // { dg-warning "integer overflow in preprocessor expression" "" { target c++98_only } } |
| 6 |
#warning "Unexpected value" |
| 7 |
#endif |
| 8 |
#if (3 << 62) != -4611686018427387904 // { dg-warning "integer overflow in preprocessor expression" "" { target c++98_only } } |
| 9 |
#warning "Unexpected value" |
| 10 |
#endif |
| 11 |
#if 1 << 64 // { dg-warning "integer overflow in preprocessor expression" } |
| 12 |
#endif |
| 13 |
#if (3 << 63) != -9223372036854775807 - 1 // { dg-warning "integer overflow in preprocessor expression" "" { target c++17_down } } |
| 14 |
#warning "Unexpected value" |
| 15 |
#endif |