[fpc-devel]Warning: cdecl'ared functions have no high parameter

Florian Klaempfl Florian.Klaempfl at gmx.de
Fri Dec 13 11:10:00 CET 2002


Pierre Muller wrote:
> At 06:29 13/12/2002, Judison wrote:
> 
>>Hi all,
>>
>>I got this warning:
>>
>>Warning: cdecl'ared functions have no high parameter
>>
>>on every external C function with overload and a "array of const" parameter
>>
>>function A(p1: longint; args: array of const): PChar; cdecl; external;
>>function A(p1: longint): PChar; cdecl; external;
>>
>>Well, i never used the second variation, but.....
>>
>>I'm doing something wrong?
>>
>>I know thar it is you Carl.... You and your annoying warnings...
>>(I'm just kidding, don't flame me) :)
> 
> 
> You lost: 
> its me (Pierre Muller) that
> added this message.

But for arrays of constant this doesn't applied, no? We use
them to substitute the ... in C.

> 
> The purpose of the message is to make clear that the
> high parameter (containing the nubmer of elements of the array
> that is normally passed to Free Pascal functions
> having an open array parameter, is not passed to that function.
> 
> In fact this kind of warnings is only useful if  the function is not external...
> but the warning is issued when 'cdecl' is parsed, so
> the compiler does not know yet that the function 
> is external....
> 
> I don't know a clear solution....
> We could of course change the warning into a hint...
> 
> All suggestions welcome.







More information about the fpc-devel mailing list