[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:44:39 PDT 2014


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

Ketmar Dark <ketmar at ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ketmar at ketmar.no-ip.org

--- Comment #8 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
(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?
that code is foobared. please, don't use it.

--


More information about the Digitalmars-d-bugs mailing list