forked from gbdev/rgbds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement warning for unused macro args
- Loading branch information
Showing
22 changed files
with
90 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
OPT Wno-unused-macro-arg ; various macro arguments go unused | ||
|
||
MACRO print_all | ||
REPT _NARG | ||
PRINT " \1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
error: bracketed-macro-args.asm(33) -> bracketed-macro-args.asm::bad(26): | ||
error: bracketed-macro-args.asm(35) -> bracketed-macro-args.asm::bad(28): | ||
Bracketed symbol "nonnumeric" is not numeric | ||
error: bracketed-macro-args.asm(33) -> bracketed-macro-args.asm::bad(27): | ||
error: bracketed-macro-args.asm(35) -> bracketed-macro-args.asm::bad(29): | ||
Invalid bracketed macro argument '\<0>' | ||
error: bracketed-macro-args.asm(33) -> bracketed-macro-args.asm::bad(28): | ||
error: bracketed-macro-args.asm(35) -> bracketed-macro-args.asm::bad(30): | ||
Bracketed symbol "undefined" does not exist | ||
error: bracketed-macro-args.asm(33) -> bracketed-macro-args.asm::bad(29): | ||
error: bracketed-macro-args.asm(35) -> bracketed-macro-args.asm::bad(31): | ||
Macro argument '\<2>' not defined | ||
error: bracketed-macro-args.asm(33) -> bracketed-macro-args.asm::bad(30): | ||
error: bracketed-macro-args.asm(35) -> bracketed-macro-args.asm::bad(32): | ||
Macro argument '\<2>' not defined | ||
error: bracketed-macro-args.asm(39) -> bracketed-macro-args.asm::toolong(36): | ||
error: bracketed-macro-args.asm(41) -> bracketed-macro-args.asm::toolong(38): | ||
Bracketed symbol "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz" does not exist | ||
error: Assembly aborted (6 errors)! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
error: line-continuation-whitespace.asm(7): | ||
Label "foo" created outside of a SECTION | ||
warning: line-continuation-whitespace.asm(8) -> line-continuation-whitespace.asm::bar(5): [-Wunused-macro-arg] | ||
Unused macro arg \1 | ||
error: Assembly aborted (1 error)! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
OPT Wno-unused-macro-arg ; various macro arguments go unused | ||
|
||
MACRO testing | ||
db _NARG | ||
shift | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
warning: narg-decreases-after-shift.asm(14) -> narg-decreases-after-shift.asm::testing(9): [-Wmacro-shift] | ||
warning: narg-decreases-after-shift.asm(16) -> narg-decreases-after-shift.asm::testing(11): [-Wmacro-shift] | ||
Cannot shift macro arguments past their end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,6 @@ MACRO m | |
shift -1 | ||
shift -1 | ||
ENDM | ||
pusho Wno-unused-macro-arg | ||
m one | ||
popo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
warning: shift-negative.asm(20) -> shift-negative.asm::m(13): [-Wmacro-shift] | ||
warning: shift-negative.asm(21) -> shift-negative.asm::m(13): [-Wmacro-shift] | ||
Cannot shift macro arguments past their end | ||
warning: shift-negative.asm(20) -> shift-negative.asm::m(14): [-Wmacro-shift] | ||
warning: shift-negative.asm(21) -> shift-negative.asm::m(14): [-Wmacro-shift] | ||
Cannot shift macro arguments past their beginning | ||
warning: shift-negative.asm(20) -> shift-negative.asm::m(16): [-Wmacro-shift] | ||
warning: shift-negative.asm(21) -> shift-negative.asm::m(16): [-Wmacro-shift] | ||
Cannot shift macro arguments past their end | ||
warning: shift-negative.asm(20) -> shift-negative.asm::m(18): [-Wmacro-shift] | ||
warning: shift-negative.asm(21) -> shift-negative.asm::m(18): [-Wmacro-shift] | ||
Cannot shift macro arguments past their beginning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
error: skip-expansions.asm(31) -> skip-expansions.asm::mac2(21): | ||
error: skip-expansions.asm(33) -> skip-expansions.asm::mac2(23): | ||
Macro argument '\1' not defined | ||
error: skip-expansions.asm(31) -> skip-expansions.asm::mac2(21): | ||
error: skip-expansions.asm(33) -> skip-expansions.asm::mac2(23): | ||
syntax error, unexpected ( | ||
error: skip-expansions.asm(31) -> skip-expansions.asm::mac2(21): | ||
error: skip-expansions.asm(33) -> skip-expansions.asm::mac2(23): | ||
Macro argument '\2' not defined | ||
error: Assembly aborted (3 errors)! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters