Add support for toggleable warnings

This commit is contained in:
ISSOtm
2019-11-18 09:23:32 +01:00
parent 58556f91f7
commit 191ee4ba1f
20 changed files with 362 additions and 131 deletions

View File

@@ -1,4 +1,4 @@
warning: correct-line-number.asm(5):
warning: correct-line-number.asm(5): [-Wuser]
Am I geting ahead of myself?
warning: correct-line-number.asm(11):
warning: correct-line-number.asm(11): [-Wuser]
Hopefully not.

View File

@@ -1,4 +1,4 @@
warning: multiple-charmaps.asm(75):
warning: multiple-charmaps.asm(75): [-Wobsolete]
Using 'charmap' within a section when the current charmap is 'main' is deprecated
ERROR: multiple-charmaps.asm(100) -> multiple-charmaps.asm::new_(7):
Charmap 'map1' already exists

View File

@@ -1,14 +1,14 @@
warning: overflow.asm(24):
warning: overflow.asm(24): [-Wdiv]
Division of min value by -1
warning: overflow.asm(25):
warning: overflow.asm(25): [-Wdiv]
Division of min value by -1
warning: overflow.asm(34):
warning: overflow.asm(34): [-Wshift]
Left shift of negative value: -1
warning: overflow.asm(35):
warning: overflow.asm(35): [-Wshift]
Left shift of negative value: -1
warning: overflow.asm(39):
warning: overflow.asm(39): [-Wlarge-constant]
Integer constant '4294967296' is too large
warning: overflow.asm(42):
warning: overflow.asm(42): [-Wlarge-constant]
Graphics constant '`333333333' is too long
$80000000
$7FFFFFFF

View File

@@ -1,18 +1,18 @@
warning: strsub.asm(13) -> strsub.asm::xstrsub(4):
warning: strsub.asm(13) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 32
warning: strsub.asm(14) -> strsub.asm::xstrsub(4):
warning: strsub.asm(14) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 300
warning: strsub.asm(15) -> strsub.asm::xstrsub(4):
warning: strsub.asm(15) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position starts at 1
warning: strsub.asm(15) -> strsub.asm::xstrsub(4):
warning: strsub.asm(15) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 300
warning: strsub.asm(16) -> strsub.asm::xstrsub(4):
warning: strsub.asm(16) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position 4 is past the end of the string
warning: strsub.asm(17) -> strsub.asm::xstrsub(4):
warning: strsub.asm(17) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position 4 is past the end of the string
warning: strsub.asm(17) -> strsub.asm::xstrsub(4):
warning: strsub.asm(17) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 1
warning: strsub.asm(20) -> strsub.asm::xstrsub(4):
warning: strsub.asm(20) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 10
A
B

View File

@@ -10,7 +10,7 @@ rc=0
for i in *.asm; do
for variant in '' '.pipe'; do
if [ -z "$variant" ]; then
../../rgbasm -o $o $i > $after 2>&1
../../rgbasm -Weverything -o $o $i > $after 2>&1
desired_output=${i%.asm}.out
else
# `include-recursion.asm` refers to its own name inside the test code.
@@ -23,7 +23,7 @@ for i in *.asm; do
# stdin redirection makes the input an unseekable pipe - a scenario
# that's harder to deal with and was broken when the feature was
# first implemented.
cat $i | ../../rgbasm -o $o - > $after 2>&1
cat $i | ../../rgbasm -Weverything -o $o - > $after 2>&1
# Escape regex metacharacters
desired_output=$before