|
| 1 | +fe_only -DTEST_NUMBER=3 --c++20 --diag_suppress=62 Test_name.c |
| 2 | +"Test_name.c", line 27: error: expression must have a constant value |
| 3 | + constexpr int shift_too_large = 1 << 32; |
| 4 | + ^ |
| 5 | +"Test_name.c", line 27: note: shift count is too large |
| 6 | + constexpr int shift_too_large = 1 << 32; |
| 7 | + ^ |
| 8 | + |
| 9 | +"Test_name.c", line 28: error: expression must have a constant value |
| 10 | + constexpr int shift_negative = 1 << -1; |
| 11 | + ^ |
| 12 | + |
| 13 | +"Test_name.c", line 29: error: expression must have a constant value |
| 14 | + constexpr int divide_by_zero = 10 / 0; |
| 15 | + ^ |
| 16 | +"Test_name.c", line 29: note: division by zero |
| 17 | + constexpr int divide_by_zero = 10 / 0; |
| 18 | + ^ |
| 19 | + |
| 20 | +"Test_name.c", line 31: error: expression must have a constant value |
| 21 | + enum { E_shift_too_large = 1 << 32, E_divide_by_zero = 10 / 0 }; |
| 22 | + ^ |
| 23 | +"Test_name.c", line 31: note: shift count is too large |
| 24 | + enum { E_shift_too_large = 1 << 32, E_divide_by_zero = 10 / 0 }; |
| 25 | + ^ |
| 26 | + |
| 27 | +"Test_name.c", line 31: error: expression must have a constant value |
| 28 | + enum { E_shift_too_large = 1 << 32, E_divide_by_zero = 10 / 0 }; |
| 29 | + ^ |
| 30 | +"Test_name.c", line 31: note: division by zero |
| 31 | + enum { E_shift_too_large = 1 << 32, E_divide_by_zero = 10 / 0 }; |
| 32 | + ^ |
| 33 | + |
| 34 | +"Test_name.c", line 33: error: expression must have a constant value |
| 35 | + int array_bound[1 << 32]; |
| 36 | + ^ |
| 37 | +"Test_name.c", line 33: note: shift count is too large |
| 38 | + int array_bound[1 << 32]; |
| 39 | + ^ |
| 40 | + |
| 41 | +"Test_name.c", line 35: error: expression must have a constant value |
| 42 | + static_assert((1 << 33) == 0); |
| 43 | + ^ |
| 44 | +"Test_name.c", line 35: note: shift count is too large |
| 45 | + static_assert((1 << 33) == 0); |
| 46 | + ^ |
| 47 | + |
| 48 | +"Test_name.c", line 38: error: expression must have a constant value |
| 49 | + S<1 << 34> s; |
| 50 | + ^ |
| 51 | +"Test_name.c", line 38: note: shift count is too large |
| 52 | + S<1 << 34> s; |
| 53 | + ^ |
| 54 | + |
| 55 | +"Test_name.c", line 43: warning: shift count is too large |
| 56 | + return (x << 40) + (x / 0) + (x << -1); |
| 57 | + ^ |
| 58 | + |
| 59 | +"Test_name.c", line 43: warning: division by zero |
| 60 | + return (x << 40) + (x / 0) + (x << -1); |
| 61 | + ^ |
| 62 | + |
| 63 | +"Test_name.c", line 27: warning: variable "shift_too_large" was declared but never referenced |
| 64 | + constexpr int shift_too_large = 1 << 32; |
| 65 | + ^ |
| 66 | + |
| 67 | +"Test_name.c", line 28: warning: variable "shift_negative" was declared but never referenced |
| 68 | + constexpr int shift_negative = 1 << -1; |
| 69 | + ^ |
| 70 | + |
| 71 | +"Test_name.c", line 29: warning: variable "divide_by_zero" was declared but never referenced |
| 72 | + constexpr int divide_by_zero = 10 / 0; |
| 73 | + ^ |
| 74 | + |
| 75 | +8 errors detected in the compilation of "Test_name.c". |
0 commit comments