mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 23:49:07 +02:00
* give an error when trying to call through to a C varargs routine with a
high level code generator o we cannot create a high-level stub in that case git-svn-id: trunk@41443 -
This commit is contained in:
parent
a51c06f907
commit
bc77aad3d9
@ -1594,7 +1594,10 @@ parser_e_only_static_members_via_object_type=03349_E_Only static methods and sta
|
|||||||
% TObj.test;
|
% TObj.test;
|
||||||
% \end{verbatim}
|
% \end{verbatim}
|
||||||
% \var{test} is not a static method and hence cannot be called through a type, but only using an instance.
|
% \var{test} is not a static method and hence cannot be called through a type, but only using an instance.
|
||||||
%
|
parse_e_callthrough_varargs=03350_E_Cannot redeclare C-style variadic function "$1" as external on this platform; make its first declaration already external
|
||||||
|
% If a function is declared normally in the interface or as a forward declaration, and then later as external, the compiler
|
||||||
|
% must generate a stub that calls the external function. Due to code generation limitations, this cannot be done on some
|
||||||
|
% platforms. Even on platforms where it is supported, this is quite inefficient.
|
||||||
%
|
%
|
||||||
% \end{description}
|
% \end{description}
|
||||||
%
|
%
|
||||||
|
@ -460,6 +460,7 @@ const
|
|||||||
parser_w_operator_overloaded_hidden_3=03347;
|
parser_w_operator_overloaded_hidden_3=03347;
|
||||||
parser_e_threadvar_must_be_class=03348;
|
parser_e_threadvar_must_be_class=03348;
|
||||||
parser_e_only_static_members_via_object_type=03349;
|
parser_e_only_static_members_via_object_type=03349;
|
||||||
|
parse_e_callthrough_varargs=03350;
|
||||||
type_e_mismatch=04000;
|
type_e_mismatch=04000;
|
||||||
type_e_incompatible_types=04001;
|
type_e_incompatible_types=04001;
|
||||||
type_e_not_equal_types=04002;
|
type_e_not_equal_types=04002;
|
||||||
@ -1107,9 +1108,9 @@ const
|
|||||||
option_info=11024;
|
option_info=11024;
|
||||||
option_help_pages=11025;
|
option_help_pages=11025;
|
||||||
|
|
||||||
MsgTxtSize = 82796;
|
MsgTxtSize = 82926;
|
||||||
|
|
||||||
MsgIdxMax : array[1..20] of longint=(
|
MsgIdxMax : array[1..20] of longint=(
|
||||||
28,106,350,126,99,59,142,34,221,67,
|
28,106,351,126,99,59,142,34,221,67,
|
||||||
62,20,30,1,1,1,1,1,1,1
|
62,20,30,1,1,1,1,1,1,1
|
||||||
);
|
);
|
||||||
|
1199
compiler/msgtxt.inc
1199
compiler/msgtxt.inc
File diff suppressed because it is too large
Load Diff
@ -2371,7 +2371,14 @@ implementation
|
|||||||
if (not pd.forwarddef) and
|
if (not pd.forwarddef) and
|
||||||
(pd.hasforward) and
|
(pd.hasforward) and
|
||||||
(proc_get_importname(pd)<>'') then
|
(proc_get_importname(pd)<>'') then
|
||||||
call_through_new_name(pd,proc_get_importname(pd))
|
begin
|
||||||
|
{ we cannot handle the callee-side of variadic functions (and
|
||||||
|
even if we could, e.g. LLVM cannot call through to something
|
||||||
|
else in that case) }
|
||||||
|
if is_c_variadic(pd) then
|
||||||
|
Message1(parse_e_callthrough_varargs,pd.fullprocname(false));
|
||||||
|
call_through_new_name(pd,proc_get_importname(pd));
|
||||||
|
end
|
||||||
else
|
else
|
||||||
{$endif cpuhighleveltarget}
|
{$endif cpuhighleveltarget}
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user