[fpc-devel] who can explain why array of const can't be passed to another array of const
Jonas Maebe
jonas.maebe at elis.ugent.be
Wed Sep 14 10:03:01 CEST 2011
On 14 Sep 2011, at 04:15, Paul Ishenin wrote:
> If I change "cdecl" to "stdcall" in g_object_dosomething then it
> compiles with no error.
>
> For me it is strange. Should developer care about internal compiler
> representation of an "array of const" for different conventions?
It's more that even though both are called "array of const", they are
completely different things. They also don't support the same types.
> Imo this is a compiler task.
>
> I've checked the same on delphi XE and there it compiles.
>
> So whether this is 1)a bug 2)unimplemented feature 3)desired
> compiler behavior?
You could say it is an unimplemented feature, but implementing it
would require a lot of assembler code that's different for every
architecture (and in some cases also for different OSes, since not all
OSes use the same ABI and the ABI defines how C varargs must be
passed). It is not a bug since the error message is given on purpose.
Jonas
More information about the fpc-devel
mailing list