fix issues 14591, 17310: ambiguous mangling for calling conventions Pascal and Objective-C#6702
fix issues 14591, 17310: ambiguous mangling for calling conventions Pascal and Objective-C#6702rainers wants to merge 1 commit intodlang:masterfrom
Conversation
…d extern(Objective-C) to "No"
|
Bang on time just as I'm about to send patches for gcc to remove the pascal specific special case for a more generic approach. |
|
My initial thoughts are not so sure about using N for a third meaning. There's already special handling between the two existing uses of N. |
Yeah, but the other extendible encoding is 'z' which seems to be no better. An alternative would be to extend this change to the extern(Windows) mangling and then use 'Ww', 'Wp' and 'Wo'. |
Another option could be to always use 'F' for function types of any linkage, and then use AFAICT all remaining demangle failures in dlang/druntime#1830 (comment) are caused by this ambiguity. |
We could also just prefix all the non-D calling convention letters 'U','W','V','R','Y' with 'F' as a function cannot directly follow as an argument. This wouldn't "release" those characters for other encodings, though. |
|
|
|
|
Fine with me. |
This changes mangling of extern(Pascal) to "Np" and extern(Objective-C) to "No".
There is no support for Objective-C in druntime or phobos, but Pascal needs a few changes: dlang/druntime#1812 and dlang/phobos#5333