Allow OPT to modify -W

Warning flags are processed individually;
PUSHO and POPO (re)store all the warning states.
This commit is contained in:
Rangi
2021-03-15 10:30:40 -04:00
committed by Eldred Habert
parent 2c30ab8731
commit d43408f4f3
8 changed files with 52 additions and 17 deletions

View File

@@ -1,10 +1,12 @@
SECTION "test", ROM0
pusho
opt p42, !L
opt p42, !L, Wno-div
ds 1
ld [$ff88], a
println $8000_0000 / -1
popo
ds 1
ld [$ff88], a
println $8000_0000 / -1

View File

@@ -0,0 +1,2 @@
warning: opt.asm(12): [-Wdiv]
Division of -2147483648 by -1 yields -2147483648

View File

@@ -0,0 +1,2 @@
$80000000
$80000000