[Issue 23803] New: Link error instead of error message when using betterC

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 23 09:54:08 UTC 2023


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

          Issue ID: 23803
           Summary: Link error instead of error message when using betterC
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: razvan.nitu1305 at gmail.com

This could should error stating that `a~b` is not allowed in betterC

string foo()()
{
    string a, b;
    return a ~ b;
}

extern(C) void main()
{
    foo();
}

However, it gives a linker error because the compiler chooses to simply not
emit the functions that use the GC when using the -betterC switch.

--


More information about the Digitalmars-d-bugs mailing list