Jonas Maebe schrieb:
On 16 Sep 2009, at 20:09, Sven Barth wrote:
Jonas Maebe schrieb:
As far as I know, there is not a single test for this functionality,
so I'm not sure that it actually works.
Well... then I think it's time to change this.
I'll try to test this functionality (and to fix it, if it fails),
Thanks!
But I can't say when I'll have the time for it. Some weeks/months more
won't matter with this old feature ^^
Frankly, I don't really know. I only discovered this by chance while
working on the Objective-C support. As far as I could tell, you simply
have to use "cppclass" rather than "class", and that's it (the cppdecl
name mangling style is automatically applied to all methods afterwards,
if I remember correctly). I don't think that field accesses can work at
all though, nor calling virtual methods (let alone defining multiple
inheritance hierarchies). The only thing that really seemed to be
implemented was C++ name mangling.
Virtual methods would have been cool... So we would be able to import e.
g. the Irrlicht library in a very easy way ^^
(although I think this message will be posted between Jonas' and
Florian's, I will quote Florian here, cause I'm using digest mode and
don't know how to answer him more directly (in the list))
>
> The code is already very old. It worked for very simply classes and
> gcc 2.95 iirc. But nobody continued so far to improve it.
>
The little searching that I did in the compiler's source tells me that
it already supports gcc 3.x (and with this 4.x) name mangling. So it
*should* work with gcc 3+. But whether it works is indeed another story ^^
If someone would be willing to extend this feature (virtual methods,
perhaps multiple inheritance) would this be welcomed? I don't know if
I'll find the time to do that, but I think it would certainly increase
my knowledge about the compiler ^^ (but first I'll steer the Native NT
port into a save harbour :) )
Regards,
Sven
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel