diff --git a/Parser.pas b/Parser.pas index 41a6d8e..d86eb7e 100644 --- a/Parser.pas +++ b/Parser.pas @@ -3781,6 +3781,10 @@ if isFunction then begin if isInline then if declSpecifiers.storageClass <> staticsy then Error(120); + if isInline or isNoreturn then + if not (isNewDeskAcc or isClassicDeskAcc or isCDev or isNBA or isXCMD) then + if variable^.name^ = 'main' then + Error(181); if alignmentSpecified then Error(142); if _Thread_localsy in declSpecifiers.declarationModifiers then diff --git a/Scanner.pas b/Scanner.pas index 6b14d12..8b9656e 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -775,6 +775,7 @@ if list or (numErr <> 0) then begin 178: msg := @'_Thread_local may not appear in a function declaration'; 179: msg := @'_Pragma requires one string literal argument'; 180: msg := @'decimal digit sequence expected'; + 181: msg := @'''main'' may not have any function specifiers'; otherwise: Error(57); end; {case} writeln(msg^);