Waldek Hebisch wrote:
Frank Heckenbach wrote:
Waldek Hebisch wrote:
It seems much better to avoid users doing mangling by hand. And even if support for other languages is delayed it is better to reserve the syntax in advance.
Well, which syntax? The existing and suggested syntax only covers explicitly specified asmnames (which should always be possible, of course).
So if we want to support other language's mangling schemes in the future (which is probably more than one can of worms, and I'm not sure if will be feasible, given that even different C++ compilers use different schemes), we need some additional syntax.
A new `attribute' can always be added (no danger of conflicts).
If you're thinking of something like `external 'C' ...' (similar to `extern "C"' in C++), there might be conflicts since BP actually allows (which GPC doesn't support yet, but might in the future):
external 'library-name' name 'asmname';
So, which syntax do you propose?
I would be happy with an attribute, say procedure Foo(x: real); attribute (external, name = 'foo(double)', linkage = 'C++');
OK, that will be easy to add anytime (i.e., when someone implements the hard bits).
`attribute (external)' isn't implemented yet (though it could be, semantically, equivalent to plain `external'). Do you think I should do so?
Frank