DEADSOFTWARE

errors and warnings marked explicitly
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Sun, 28 Jul 2019 20:24:00 +0000 (23:24 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Sun, 28 Jul 2019 20:24:00 +0000 (23:24 +0300)
src/generic/Dev/Mod/CPC486.odc
src/generic/Dev/Mod/CPM.cp

index 0898cd23de4300d617709a2acf9ad63b941e4e00..b3e870d8c9619d6939d2f0247a6a8bfef79fac1c 100644 (file)
Binary files a/src/generic/Dev/Mod/CPC486.odc and b/src/generic/Dev/Mod/CPC486.odc differ
index 38cfe53fb66928cd5a963fefe207c8c10bcf7e90..97c6b3e569837bc50cd58638a8484bd0e05fe5e4 100644 (file)
@@ -503,7 +503,7 @@ MODULE DevCPM;
                        END;
                        IF trap IN options THEN HALT(100) END;
                ELSIF (n <= -700) & (errors < maxErrors) THEN
-                       errNo[errors] := -n; errPos[errors] := pos; INC(errors)
+                       errNo[errors] := n; errPos[errors] := pos; INC(errors)
                END
        END Mark;
        
@@ -514,7 +514,7 @@ MODULE DevCPM;
        
        PROCEDURE GetErrorMsg (err: INTEGER; OUT msg: ARRAY OF CHAR);
        BEGIN
-               CASE err OF
+               CASE ABS(err) OF
                | 0: msg := 'undeclared identifier'
                | 1: msg := 'multiply defined identifier'
                | 2: msg := 'illegal character in number'
@@ -757,6 +757,15 @@ MODULE DevCPM;
                | 411: msg := 'no proofable return'
                | 412: msg := 'illegal constructor call'
                | 413: msg := 'missing constructor call'
+(* COM-related
+                | 700: msg := '700'
+                | 701: msg := '701'
+                | 702: msg := '702'
+                | 703: msg := '703'
+*)
+                | 777: msg := 'register not released'
+                | 778: msg := 'float register not released'
+                | 779: msg := 'float register overallocated'
                ELSE Strings.IntToString(err, msg)
                END
        END GetErrorMsg;
@@ -791,6 +800,9 @@ MODULE DevCPM;
                                Console.WriteChar(":");
                                Strings.IntToString(errPos[n], s); Console.WriteStr(s);
                                Console.WriteStr(": ");
+                               IF errNo[n] >= 0 THEN Console.WriteStr("error: ")
+                               ELSE Console.WriteStr("warning: ")
+                               END;
                                GetErrorMsg(errNo[n], s);
                                Console.WriteStr(s);
                                Console.WriteLn;