From 434e31a97a832240d5ccbe7d304f40554e7ab1bf Mon Sep 17 00:00:00 2001 From: darcy Date: Tue, 30 Sep 2025 14:29:50 +1000 Subject: [PATCH 1/3] feat: promote incorrect operand count warning to error --- src/assemble.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assemble.c b/src/assemble.c index 3b9ff8a..956e7c4 100644 --- a/src/assemble.c +++ b/src/assemble.c @@ -238,7 +238,7 @@ uint8_t passone (uint32_t ln, uint16_t *addr, TokenBuffer *buf, arrs_t *arrs) if (opnum == -1) { } else if (opcount > opnum) { - warning (ln, "'%s' expects %d operands", tok, opnum); + error (ln, "'%s' expects %d operands", tok, opnum); } else if (opcount < opnum) { error (ln, "'%s' expects %d operands", tok, opnum); } From 768d282e79bec623b7c88be15688acf5b7ff8b48 Mon Sep 17 00:00:00 2001 From: darcy Date: Tue, 30 Sep 2025 14:30:17 +1000 Subject: [PATCH 2/3] feat: promote unexpected psuedo-op warning to error --- src/assemble.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assemble.c b/src/assemble.c index 956e7c4..6a2909b 100644 --- a/src/assemble.c +++ b/src/assemble.c @@ -216,7 +216,7 @@ uint8_t passone (uint32_t ln, uint16_t *addr, TokenBuffer *buf, arrs_t *arrs) } else if (pop == FILL) { *addr += 1; } else { - warning (ln, "Ignoring unexpected use of '%s' in program body", + error (ln, "Unexpected use of '%s' in program body", token[j]->str); } } else if (isregister (token[j]) >= 0) { @@ -526,7 +526,7 @@ uint8_t passtwo (uint32_t tbufind, uint16_t *addr, arrs_t *arrs) case IMPORT: if (isproject ()) break; default: - warning (ln, "Ignoring unexpected use of '%s' in program body", + error (ln, "Unexpected use of '%s' in program body", token[0]->str); break; } From cb6cdb8a426957a3b0c3f83761cc8531da07d432 Mon Sep 17 00:00:00 2001 From: darcy Date: Tue, 30 Sep 2025 14:30:36 +1000 Subject: [PATCH 3/3] feat: promote invalid token before `.ORIG` warning to error --- src/assemble.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assemble.c b/src/assemble.c index 6a2909b..50812cd 100644 --- a/src/assemble.c +++ b/src/assemble.c @@ -91,7 +91,7 @@ uint16_t preorig (filearr_t f, uint32_t *ln, arrs_t *arrs) warning (i, "'%s' is only used in project mode", token[0]->str); break; default: - warning (i, "Ignoring invalid token '%s' before '.ORIG'", + error (i, "Invalid token '%s' before '.ORIG'", token[0]->str); break; }