Commit 829c848
Stefan
tccpp.c: Configurable integer literal overflow handling
Add the define TCC_CUT_ON_INTEGER_LITERAL_OVERFLOW to use the most
significant digits of an integer literal before its parsing led to an
overflow.
When compiling tcc with another compiler, which is not able to handle
64 bit arithmetic, it is beneficial to use the last value before an
integer literal overflows. Parsing 0x1000000000000000 then results in
0x10000000. The mescc from GNU Mes is able to compile a first tcc on a
32 bit system without 64 bit arithmetic. This change allows this first
tcc to compile a second tcc with complete 64 bit arithmetic.1 parent cb41cbf commit 829c848
1 file changed
Lines changed: 15 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2550 | 2550 | | |
2551 | 2551 | | |
2552 | 2552 | | |
2553 | | - | |
| 2553 | + | |
2554 | 2554 | | |
2555 | 2555 | | |
2556 | 2556 | | |
| |||
2561 | 2561 | | |
2562 | 2562 | | |
2563 | 2563 | | |
2564 | | - | |
2565 | 2564 | | |
2566 | 2565 | | |
2567 | 2566 | | |
| |||
2575 | 2574 | | |
2576 | 2575 | | |
2577 | 2576 | | |
2578 | | - | |
2579 | 2577 | | |
2580 | | - | |
2581 | | - | |
2582 | | - | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
2583 | 2584 | | |
2584 | | - | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
2585 | 2593 | | |
2586 | 2594 | | |
2587 | 2595 | | |
| |||
0 commit comments