mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-27 17:19:14 +02:00
* only allow cdecl "array of const" parameters for procvars and for external
routines (just like "varargs"), because if implemented in Pascal then on the callee side this array of const parameter is treated as a Pascal- style array of const * don't give the "cdecl'ared functions have no high parameter" warning for array of const parameters for cdecl external routines and procvars git-svn-id: trunk@13618 -
This commit is contained in:
parent
ae6200ce72
commit
ceb547d027
@ -298,8 +298,12 @@ implementation
|
||||
begin
|
||||
if is_open_string(vardef) then
|
||||
MessagePos(fileinfo,parser_w_cdecl_no_openstring);
|
||||
if not (po_external in pd.procoptions) then
|
||||
MessagePos(fileinfo,parser_w_cdecl_has_no_high);
|
||||
if not(po_external in pd.procoptions) and
|
||||
(pd.typ<>procvardef) then
|
||||
if is_array_of_const(vardef) then
|
||||
MessagePos(fileinfo,parser_e_varargs_need_cdecl_and_external)
|
||||
else
|
||||
MessagePos(fileinfo,parser_w_cdecl_has_no_high);
|
||||
end;
|
||||
if (vardef.typ=formaldef) and (Tformaldef(vardef).typed) then
|
||||
begin
|
||||
|
@ -1,3 +1,4 @@
|
||||
{ %fail }
|
||||
|
||||
{ first simple array of const test }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user