[Issue 23255] [REG 2.099] undefined reference to 'core.internal.switch.__switch_error()(string, size_t)'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 23 21:29:45 UTC 2022


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

--- Comment #5 from Iain Buclaw <ibuclaw at gdcproject.org> ---
(In reply to kinke from comment #4)
> (In reply to Iain Buclaw from comment #2)
> > Looks like mixing of release and non-release causes this.
> > 
> > foo-release -> does not generate __switch_error.
> > 
> > test-non-release -> generates __switch_error, but assumes that `foo` will
> > too, so elides the emission.  This results in the undefined reference.
> > 
> > Confirmed that in 2.098, test-non-release always emits __switch_error.
> 
> Makes perfect sense, and is accordingly no regression, just a missed case of
> culling which is now properly culled. Linking code compiled with different
> flags affecting template codegen is a well-known issue, and `-allinst` is
> supposed to handle that, but isn't enough in all cases (which are real bugs,
> either regarding template emission or inconsistent attributes inference).
Or perhaps when importing modules across (multiple) DSO boundaries, only expose
.di interface files between them.

--


More information about the Digitalmars-d-bugs mailing list