Only print one warning for too-large integer constants, not one per digit (#1781)

This also makes all too-large integer constants evaluate to 0.
This commit is contained in:
Rangi
2025-08-08 18:58:38 -04:00
committed by GitHub
parent 1574b5b1f7
commit e41ce49698
7 changed files with 88 additions and 58 deletions

View File

@@ -1,25 +1,27 @@
error: invalid-numbers.asm(2):
error: invalid-numbers.asm(11) -> invalid-numbers.asm::try(2):
Invalid integer constant, no digits after '$'
error: invalid-numbers.asm(3):
error: invalid-numbers.asm(12) -> invalid-numbers.asm::try(2):
Invalid graphics constant, no digits after '`'
error: invalid-numbers.asm(4):
error: invalid-numbers.asm(13) -> invalid-numbers.asm::try(2):
Invalid integer constant, no digits after '%'
error: invalid-numbers.asm(5):
error: invalid-numbers.asm(14) -> invalid-numbers.asm::try(2):
Invalid integer constant, no digits after '&'
error: invalid-numbers.asm(6):
error: invalid-numbers.asm(15) -> invalid-numbers.asm::try(2):
Invalid integer constant, no digits after '$'
warning: invalid-numbers.asm(9): [-Wlarge-constant]
warning: invalid-numbers.asm(18) -> invalid-numbers.asm::try(2): [-Wlarge-constant]
Integer constant is too large
warning: invalid-numbers.asm(10): [-Wlarge-constant]
warning: invalid-numbers.asm(19) -> invalid-numbers.asm::try(2): [-Wlarge-constant]
Integer constant is too large
warning: invalid-numbers.asm(11): [-Wlarge-constant]
warning: invalid-numbers.asm(20) -> invalid-numbers.asm::try(2): [-Wlarge-constant]
Integer constant is too large
warning: invalid-numbers.asm(12): [-Wlarge-constant]
warning: invalid-numbers.asm(21) -> invalid-numbers.asm::try(2): [-Wlarge-constant]
Integer constant is too large
warning: invalid-numbers.asm(13): [-Wlarge-constant]
warning: invalid-numbers.asm(22) -> invalid-numbers.asm::try(2): [-Wlarge-constant]
Graphics constant is too large; only first 8 pixels considered
warning: invalid-numbers.asm(23) -> invalid-numbers.asm::try(2): [-Wlarge-constant]
Magnitude of fixed-point constant is too large
error: invalid-numbers.asm(16):
error: invalid-numbers.asm(26) -> invalid-numbers.asm::try(2):
Invalid fixed-point constant, no significant digits after 'q'
error: invalid-numbers.asm(19):
error: invalid-numbers.asm(29) -> invalid-numbers.asm::try(2):
Fixed-point constant precision must be between 1 and 31
Assembly aborted with 7 errors!