www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17310] New: [SPEC] Ambiguous mangling for 'Y', Objective-C


          Issue ID: 17310
           Summary: [SPEC] Ambiguous mangling for 'Y', Objective-C
                    function or variadic arguments?
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: r.sagitario gmx.de

extern(Objective-C) void ofun();
void foo(typeof(ofun)* fn);
void goo(...);

pragma(msg, typeof(foo).mangleof);
pragma(msg, typeof(goo).mangleof);



'Y' at the position of a function argument can both be an Objective-C function
type or the end of the argument list of variadic function. 

Granted, the function type might never appear without a pointer prefix in the
argument list, but this special case makes it harder for a demangler.

Objective-C functions should use a different character (or a combination of
characters, e.g. "No") instead.

Apr 08 2017