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.
This commit is contained in:
Stephen Heumann 2023-01-09 18:46:33 -06:00
parent 2958619726
commit 61a2cd1e5e
1 changed files with 1 additions and 2 deletions

View File

@ -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^);