[Issue 9655] Two functions with identical implementations are allowed to have the same address
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Oct 31 03:38:54 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=9655
--- Comment #7 from yebblies <yebblies at gmail.com> ---
(In reply to bearophile_hugs from comment #6)
>
> This is not enough. What do you have to do if you want to be certain to have
> distinct D functions pointers even if the function body may or may not be
> the same? (There is C code out there that relies on this guaranteed, like
> some evolutionary algorithm that breeds functions). Are D functions tagged
> with extern(C) exempt from this optimization?
No, you shouldn't rely on this ever.
--
More information about the Digitalmars-d-bugs
mailing list