Jonas Maebe wrote: > >On 22 Mar 2010, at 11:19, Anton Kavalenka wrote: > >> Don't UNITS in Pascal intended to separate NAMESPACES? >> But unfortunately this prevents nested namespaces. > >The discussion is not about adding support for C++-style namespaces to Pascal, >but for how to specify the C++ namespace in which an (externally implemented) >C++ class is defined (as this influences the name mangling). >
Anton Kavalenka wrote in reply to that: >I understand :) > >The most amazing thing will start later (during linking). In what order = > >runtime initialization should be performed (first Pascal the C++ or vice = > >versa)? >Obviously C++ object files has lots of references to C++ runtime so in = > >best case we get exe file with 2 runtimes inside, >in worst case we get crash on initialization. > it even gets worse than that. Is this even possible? WHAT C++ compiler-mangling are you going to support? Every C++ compiler has its own mangling scheme, which individual versions of it can change at will as well. GNU C++ on linux/whatever system? => changed mangling between versions Borland/(open)Watcom/Digital Mars/Microsoft/... on Windows and some on other systems => same there. there are some ABI's, but they do not contain name-mangling conventions. ps: sorry to mess up your thread. I'm using digest. kind regards, Dimitri Smits _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
