Understanding Safety of Function Pointers vs. Addresses of Functions

jmh530 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 8 07:37:21 PDT 2015


On Wednesday, 8 July 2015 at 11:15:12 UTC, Marc Schütz wrote:
>
> It seems std.math.cos is an intrinsic function (i.e. one that 
> the compiler implements when needed, or generates the 
> appropriate asm for):
> https://github.com/D-Programming-Language/phobos/blob/master/std/math.d#L630
>
> The compiler should probably refuse to take the address of such 
> a function. I've found this bug report:
> https://issues.dlang.org/show_bug.cgi?id=4541

Thanks. I was worried I was doing something wrong.




More information about the Digitalmars-d-learn mailing list