[Issue 6461] multiple definitions with typeid and multiobj

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 30 11:54:38 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=6461



--- Comment #5 from Martin Nowak <code at dawg.eu> 2013-05-30 11:54:37 PDT ---
(In reply to comment #3)
> Change the title please as if Issue 9044 is dup of this, there is no need to
> generate multiple object files

It's multiobj not multiple objects and in fact you need at least two archives.

> and the issue can be triggered in dmd itself, not in the linker.

True

> Also there is no need for `typeid` (at least in user code)
> as shown in Rainer's example.

It happens when TypeInfo instances are emitted, because they are not put into a
doppelgänger module, i.e. the object contains definitions for assert,
unittest_fail, ModuleInfo.

For these TypeInfo instances s->getModule() returns NULL.
https://github.com/D-Programming-Language/dmd/blob/20655f957f3729298b79e6c695b9d7840ac5ef0f/src/glue.c#L116

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list