mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-05 17:27:26 +01:00
* do not throw an error if syscall is used with a syntax not applicable for the current
target, resolves #39640
This commit is contained in:
parent
405523ace2
commit
4718029fe0
@ -445,7 +445,7 @@ scan_e_unexpected_endif=02108_E_$ENDIF directive found without a matching $IF(N)
|
||||
#
|
||||
# Parser
|
||||
#
|
||||
# 03363 is the last used one
|
||||
# 03364 is the last used one
|
||||
#
|
||||
% \section{Parser messages}
|
||||
% This section lists all parser messages. The parser takes care of the
|
||||
@ -1638,6 +1638,9 @@ parser_e_raise_with_noreturn_not_allowed=03361_E_Raise in subroutines declared a
|
||||
parser_e_section_directive_not_allowed_for_target=03362_E_Directive section not allowed for this target
|
||||
% Only some targets (e.g. Embedded and FreeRTOS) support the section directive.
|
||||
parser_e_absolute_sym_cannot_reference_itself=03363_E_Absolute variable cannot reference itself
|
||||
parser_e_syscall_format_not_support=03364_E_Syntax of syscall directive not supported by current target
|
||||
% On a certain target, not all syntax variants of the syscall directive make sense and thus those making
|
||||
% no sense are not supported
|
||||
% Declarations like \var{var i: Integer absolute i;} are not allowed
|
||||
%
|
||||
% \end{description}
|
||||
|
||||
@ -477,6 +477,7 @@ const
|
||||
parser_e_raise_with_noreturn_not_allowed=03361;
|
||||
parser_e_section_directive_not_allowed_for_target=03362;
|
||||
parser_e_absolute_sym_cannot_reference_itself=03363;
|
||||
parser_e_syscall_format_not_support=03364;
|
||||
type_e_mismatch=04000;
|
||||
type_e_incompatible_types=04001;
|
||||
type_e_not_equal_types=04002;
|
||||
@ -1150,9 +1151,9 @@ const
|
||||
option_info=11024;
|
||||
option_help_pages=11025;
|
||||
|
||||
MsgTxtSize = 89451;
|
||||
MsgTxtSize = 89519;
|
||||
|
||||
MsgIdxMax : array[1..20] of longint=(
|
||||
28,109,364,131,99,63,148,37,223,69,
|
||||
28,109,365,131,99,63,148,37,223,69,
|
||||
65,20,30,1,1,1,1,1,1,1
|
||||
);
|
||||
|
||||
1276
compiler/msgtxt.inc
1276
compiler/msgtxt.inc
File diff suppressed because it is too large
Load Diff
@ -2171,7 +2171,7 @@ procedure pd_syscall(pd:tabstractprocdef);
|
||||
include(pd.procoptions,get_default_syscall);
|
||||
end;
|
||||
else
|
||||
internalerror(2019050526);
|
||||
Message(parser_e_syscall_format_not_support);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
11
tests/webtbf/tw39640.pp
Normal file
11
tests/webtbf/tw39640.pp
Normal file
@ -0,0 +1,11 @@
|
||||
{ %fail }
|
||||
{ %target=linux,win32,win64,embedded,freebsd,darwin }
|
||||
program test;
|
||||
var
|
||||
execBase: pointer;
|
||||
|
||||
procedure test_a_syscall; syscall execBase 6;
|
||||
|
||||
begin
|
||||
writeln('syscall test');
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user