[Issue 9922] Improve symbol emitting for templates for better separate compilation support

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 12 00:26:14 PDT 2013


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



--- Comment #2 from Dicebot <m.strashun at gmail.com> 2013-04-12 00:26:12 PDT ---
(In reply to comment #1)
> (In reply to comment #0)
> > Most time it is just extra job for linker, but sometimes this results in nasty
> > bugs when resulting symbols are not weak ones.
> >
> I'd say this is a bug, any templated symbol must be weak.
> Do you have a test case for this.

Please correct me if I am mistaken, but this is one of the issues causing
http://d.puremagic.com/issues/show_bug.cgi?id=9571 as far as I am understand.
When auto return type is used, foo is processed as a template instance and all
symbols it uses, including problematic lambda, come to a.o via MapResult. There
are plenty of reason that make problem observable : wrong id for funcliteral,
fact that foo is treated as template instance when it is actually not, fact
that all symbols used from templates go to command-line supplied module.

Well, that is my interpretation of what gdb has told me, I am complete and
utter noob in dmd internals, so please object.

And yes, this behavior is a bug for sure on its own. That is why I have marked
this issues as an enhancement and not a bug.

-- 
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