Re: [fpc-devel] who can explain why array of const can't be passed to another array of const
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 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] who can explain why array of const can't be passed to another array of const
On Wed, Sep 14, 2011 at 19:03, Jonas Maebe jonas.ma...@elis.ugent.be wrote: 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. Perhaps varargs-compatible parameter type should be called something else then? -- Alexander S. Klenin ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] who can explain why array of const can't be passed to another array of const
On 14 Sep 2011, at 10:40, Alexander Klenin wrote: On Wed, Sep 14, 2011 at 19:03, Jonas Maebe jonas.ma...@elis.ugent.be wrote: 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. Perhaps varargs-compatible parameter type should be called something else then? Both backwards and Delphi compatibility stand in the way of that. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel