mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-26 00:34:27 +00:00
Fix $8000_0000 % -1 to warn with -Wdiv like $8000_0000 / -1 does (#2012)
This commit is contained in:
@@ -2,6 +2,7 @@ def fzero equs "startof(\"test\")"
|
||||
section "test", rom0
|
||||
ld a, $8000_0000 / ({fzero} - 1)
|
||||
ld a, $8000_0000 / ({fzero} - 2)
|
||||
ld a, $8000_0000 % ({fzero} - 1)
|
||||
ld a, 1 << ({fzero} - 1)
|
||||
ld a, 1 << ({fzero} + 32)
|
||||
ld a, ({fzero} - 1) >> 1
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
warning: Shifting right by large amount 32 [-Wshift-amount]
|
||||
at patch-diagnostics.asm(12)
|
||||
warning: Shifting right by negative amount -1 [-Wshift-amount]
|
||||
at patch-diagnostics.asm(11)
|
||||
warning: Shifting right by negative amount -1 [-Wshift-amount]
|
||||
at patch-diagnostics.asm(10)
|
||||
warning: Shifting right by large amount 32 [-Wshift-amount]
|
||||
at patch-diagnostics.asm(9)
|
||||
at patch-diagnostics.asm(10)
|
||||
warning: Shifting right by negative amount -1 [-Wshift-amount]
|
||||
at patch-diagnostics.asm(8)
|
||||
at patch-diagnostics.asm(9)
|
||||
warning: Shifting right negative value -1 [-Wshift]
|
||||
at patch-diagnostics.asm(7)
|
||||
at patch-diagnostics.asm(8)
|
||||
warning: Shifting left by large amount 32 [-Wshift-amount]
|
||||
at patch-diagnostics.asm(6)
|
||||
at patch-diagnostics.asm(7)
|
||||
warning: Shifting left by negative amount -1 [-Wshift-amount]
|
||||
at patch-diagnostics.asm(6)
|
||||
warning: Modulo of -2147483648 by -1 yields 0 [-Wdiv]
|
||||
at patch-diagnostics.asm(5)
|
||||
warning: Value $40000000 is not 8-bit [-Wtruncation]
|
||||
at patch-diagnostics.asm(4)
|
||||
|
||||
Reference in New Issue
Block a user