[Issue 22022] New: A function with pragma(mangle) mixed into a function body is missing from the binary

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 13 10:54:53 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22022

          Issue ID: 22022
           Summary: A function with pragma(mangle) mixed into a function
                    body is missing from the binary
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: maxsamukha at gmail.com

mixin template Foo() {
    pragma(mangle, "bar")
    extern(C) static void foo() {
    }
}

void main() {
    mixin Foo;
}

No 'bar' in the generated object. To work around, nest the function in a dummy
struct.

--


More information about the Digitalmars-d-bugs mailing list