[fpc-devel] First cppclass test

Florian Klaempfl florian at freepascal.org
Mon Nov 2 09:21:25 CET 2009

Sven Barth schrieb:
> Florian Klaempfl schrieb:
>> Sven Barth schrieb:
>>> All in all I have the following goals for (my) future work on this:
>>> * make a cppclass an implicit pointer
>> I don't like this idea because C++-classes aren't an implicit pointer
>> either.
> At first I wanted to disagree with you... philosophing about the Pascal
> way of doing things, bla, bla...

Pascal has also objects which are no pointers ;)

> But after 8 km of deep thinking (as I'm riding those by bike, I have
> much time :) ), I came to the conclusion that you are right. We are
> interfacing with a foreign language here and if we are in Rome, we shall
> do as the Romans do...

Yes, this is also my point.

> so: forget the idea of implicit pointers ^^
> Another question though: Do you want me to write tests for the compiler
> for this feature (e. g. those in the tests directory)?

tests/test/tcppclass1.pp, tcppclass2.pp etc.

> If so, how do you
> suggest to write those tests, especially as they (currently) rely on a
> external library...

Libraries or object files? FPC does similiar testing for C linking: the
C sources are checked in into
Compiled object files lay in the appropriate sub dir of this dir.

Testing C++ class linking should be done similiar imo.

More information about the fpc-devel mailing list