Avoid errors after missing INCLUDE with -MG (#1627)

This commit is contained in:
Rangi
2025-01-25 12:38:17 -05:00
committed by GitHub
parent 890528812e
commit 20c18256ed
3 changed files with 19 additions and 6 deletions

View File

@@ -385,6 +385,7 @@ int main(int argc, char *argv[]) {
if (yy::parser parser; parser.parse() != 0 && nbErrors == 0)
nbErrors = 1;
if (!failedOnMissingInclude) {
sect_CheckUnionClosed();
sect_CheckLoadClosed();
sect_CheckSizes();
@@ -392,6 +393,7 @@ int main(int argc, char *argv[]) {
charmap_CheckStack();
opt_CheckStack();
sect_CheckStack();
}
if (nbErrors != 0)
errx("Assembly aborted (%u error%s)!", nbErrors, nbErrors == 1 ? "" : "s");

View File

@@ -0,0 +1,10 @@
PUSHC
PUSHO
PUSHS
SECTION "test", WRAM0
UNION
INCLUDE "does not exist"
ENDU
POPS
POPO
POPC

View File

@@ -0,0 +1 @@
-Weverything -M /dev/null -MG