From 61a2cd1e5e718749ae32705c203e130708d73e16 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Mon, 9 Jan 2023 18:46:33 -0600 Subject: [PATCH] Consistently report "compiler error" for unrecognized error codes. The old approach of calling Error while in the middle of writing error messages did not work reliably. --- Scanner.pas | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Scanner.pas b/Scanner.pas index 26060e9..d854710 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -672,7 +672,7 @@ if list or (numErr <> 0) then begin 54: msg := @'bit fields must be less than 32 bits wide'; 55: msg := @'a value cannot be zero bits wide'; {56: msg := @'bit fields in unions are not supported by ORCA/C';} - 57: msg := @'compiler error'; + 57,otherwise: msg := @'compiler error'; 58: msg := @'implementation restriction: too many local labels'; 59: msg := @'file name expected'; 60: msg := @'implementation restriction: string space exhausted'; @@ -802,7 +802,6 @@ if list or (numErr <> 0) then begin 184: msg := @'segment exceeds bank size'; 185: msg := @'lint: unused variable: '; 186: msg := @'lint: implicit conversion changes value of constant'; - otherwise: Error(57); end; {case} if extraStr <> nil then begin extraStr^ := concat(msg^,extraStr^);