[phobos] Purity of C Math Functions
Simen Kjaeraas
simen.kjaras at gmail.com
Sun Dec 5 15:51:07 PST 2010
Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> On Sunday 05 December 2010 08:55:54 David Simcha wrote:
>> I'm trying to test out Brad's 64 work and I can't compile Phobos because
>> in 64 mode std.math calls some C math functions declared in druntime w/o
>> purity, safety, etc. tags. I now remember that this was one of the few
>> areas I meant to come back to when I was cleaning up 64 support in
>> Phobos, but I forgot about it. Is it safe to assume that C
>> core.stdc.math functions are @safe pure nothrow?
>
> Shouldn't _all_ C function be considered nothrow? C doesn't have
> exceptions, so
> C functions can't possibly throw.
A C function could call a D function (e.g. passed as a function pointer),
no?
--
Simen
More information about the phobos
mailing list