[Issue 12546] DMD does not generate required symbols for linker

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 16 05:39:22 PDT 2014


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

--- Comment #1 from Tomer Filiba <tomerfiliba at gmail.com> ---
Further examination shows that it's caused by the automatic addition of
function attributes:

=================================
$ nm mymodule.o | grep TypedIdentifier | grep toString
_D8mymodule40__T15TypedIdentifierVAyaa6_4d7954797065Z15TypedIdentifier8toStringMxFNaNfZAya

$ nm main.o | grep TypedIdentifier | grep toString
_D8mymodule40__T15TypedIdentifierVAyaa6_4d7954797065Z15TypedIdentifier8toStringMxFZAya
=================================

NaNf = pure @safe (according to http://dlang.org/abi.html )

When the `alias` sits in mymodule.d, toString gets qualified with `pure @safe`,
while when it's invoked in main.d, it only looks for `const`. If I move the
alias into main.d, or just skip the alias and use the full type, everything's
fine. 

This seems like a bug in the alias mechanism of the core compiler.

--


More information about the Digitalmars-d-bugs mailing list