From 63f91a768c34e0a7cba88de066b9bef0629bbcb1 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Sat, 9 Sep 2023 06:52:06 +0000 Subject: [PATCH] Avoid double definition of V_XXX constants by moving them to globals unit Add new V_Parallel constant --- compiler/comphook.pas | 26 +------------------------- compiler/globals.pas | 27 +++++++++++++++++++++++++++ compiler/verbose.pas | 24 ------------------------ 3 files changed, 28 insertions(+), 49 deletions(-) diff --git a/compiler/comphook.pas b/compiler/comphook.pas index 890d132de7..822a42abf6 100644 --- a/compiler/comphook.pas +++ b/compiler/comphook.pas @@ -34,31 +34,6 @@ uses globtype, finput; -Const - { Levels } - V_None = $0; - V_Fatal = $1; - V_Error = $2; - V_Normal = $4; { doesn't show a text like Error: } - V_Warning = $8; - V_Note = $10; - V_Hint = $20; - V_LineInfoMask = $fff; - { From here by default no line info } - V_Info = $1000; - V_Status = $2000; - V_Used = $4000; - V_Tried = $8000; - V_Conditional = $10000; - V_Debug = $20000; - V_Executable = $40000; - V_TimeStamps = $80000; - V_LevelMask = $fffffff; - V_All = V_LevelMask; - V_Default = V_Fatal + V_Error + V_Normal; - { Flags } - V_LineInfo = $10000000; - const { RHIDE expect gcc like error output } fatalstr : string[6] = 'Fatal:'; @@ -69,6 +44,7 @@ const warningerrorstr : string[29] = 'Warning: (treated as error)'; noteerrorstr : string[27] = 'Note: (treated as error)'; hinterrorstr : string[27] = 'Hint: (treated as error)'; + type PCompilerStatus = ^TCompilerStatus; TCompilerStatus = record diff --git a/compiler/globals.pas b/compiler/globals.pas index 532e47a712..59f6166cc1 100644 --- a/compiler/globals.pas +++ b/compiler/globals.pas @@ -124,6 +124,33 @@ interface nroftrashvalues = 4; trashintvalues: array[0..nroftrashvalues-1] of int64 = ($5555555555555555,$AAAAAAAAAAAAAAAA,$EFEFEFEFEFEFEFEF,0); +{ Verbosity constants } +Const + { Levels } + V_None = $0; + V_Fatal = $1; + V_Error = $2; + V_Normal = $4; { doesn't show a text like Error: } + V_Warning = $8; + V_Note = $10; + V_Hint = $20; + V_LineInfoMask = $fff; + { From here by default no line info } + V_Info = $1000; + V_Status = $2000; + V_Used = $4000; + V_Tried = $8000; + V_Conditional = $10000; + V_Debug = $20000; + V_Executable = $40000; + V_TimeStamps = $80000; + V_Parallel = $100000; + V_LevelMask = $fffffff; + V_All = V_LevelMask; + V_Default = V_Fatal + V_Error + V_Normal; + { Flags } + V_LineInfo = $10000000; + type { this is written to ppus during token recording for generics, diff --git a/compiler/verbose.pas b/compiler/verbose.pas index 3dbcdc6346..876998576b 100644 --- a/compiler/verbose.pas +++ b/compiler/verbose.pas @@ -41,30 +41,6 @@ interface {$i msgidx.inc} - Const - { Levels } - V_None = $0; - V_Fatal = $1; - V_Error = $2; - V_Normal = $4; { doesn't show a text like Error: } - V_Warning = $8; - V_Note = $10; - V_Hint = $20; - V_LineInfoMask = $fff; - { From here by default no line info } - V_Info = $1000; - V_Status = $2000; - V_Used = $4000; - V_Tried = $8000; - V_Conditional = $10000; - V_Debug = $20000; - V_Executable = $40000; - V_LevelMask = $fffffff; - V_All = V_LevelMask; - V_Default = V_Fatal + V_Error + V_Normal; - { Flags } - V_LineInfo = $10000000; - var msg : pmessage;