+ added warning in case of an $M directive with an invalid stack size specified

git-svn-id: trunk@27964 -
This commit is contained in:
nickysn 2014-06-15 10:14:56 +00:00
parent c868a5e0ea
commit 82eb84ddff
4 changed files with 717 additions and 706 deletions

View File

@ -136,7 +136,7 @@ general_f_oserror=01025_F_Operating system error: $1
#
# Scanner
#
# 02095 is the last used one
# 02096 is the last used one
#
% \section{Scanner messages.}
% This section lists the messages that the scanner emits. The scanner takes
@ -396,6 +396,11 @@ scan_e_illegal_peoptflag=02094_E_Illegal argument for SETPEOPTFLAGS
% ordinal value
scan_e_unsupported_switch=02095_E_Directive $1 is not supported on this target
% Not all compiler directives are supported on all targets.
scan_w_invalid_stacksize=02096_W_The specified stack size is not within the valid range for the platform. Setting the stack size ignored.
% The valid range for the stack size is 1024 - 67107839 on 32-bit and 64-bit
% platforms and 1024 - 65520 on 16-bit platforms. Additionally, for Turbo Pascal 7
% compatibility reasons, specifying a stack size of 65521 on 16-bit platforms
% actually sets the stack size to 65520.
% \end{description}
#
# Parser

View File

@ -117,6 +117,7 @@ const
scan_e_illegal_peflag=02093;
scan_e_illegal_peoptflag=02094;
scan_e_unsupported_switch=02095;
scan_w_invalid_stacksize=02096;
parser_e_syntax_error=03000;
parser_e_dont_nest_interrupt=03004;
parser_w_proc_directive_ignored=03005;
@ -987,9 +988,9 @@ const
option_info=11024;
option_help_pages=11025;
MsgTxtSize = 71327;
MsgTxtSize = 71440;
MsgIdxMax : array[1..20] of longint=(
26,96,337,122,89,57,126,27,202,64,
26,97,337,122,89,57,126,27,202,64,
57,20,1,1,1,1,1,1,1,1
);

File diff suppressed because it is too large Load Diff

View File

@ -714,7 +714,9 @@ unit scandir;
and (l<67107840)
{$endif cpu16bitaddr}
then
stacksize:=min(l,{$ifdef cpu16bitaddr}65520{$else}67107839{$endif});
stacksize:=min(l,{$ifdef cpu16bitaddr}65520{$else}67107839{$endif})
else
Message(scan_w_invalid_stacksize);
if c=',' then
begin
current_scanner.readchar;