[PATCH] D39481: [CodeGen] fix const-ness of builtin equivalents of <math.h> and <complex.h> functions that might set errno
Sanjay Patel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 1 07:24:14 PDT 2017
spatel added a comment.
In https://reviews.llvm.org/D39481#912378, @efriedma wrote:
> Granted, I'm not sure all of those are right... I'm pretty sure, for example, cbrt can't set errno, and carg can. But I'd prefer to deal with that in a separate patch.
I figured we have to be ultra-conservative here, and there are docs out there like this:
"On successful completion, cbrt() returns the cube root of x. If x is NaN, cbrt() returns NaN and errno may be set to [EDOM]. "
http://pubs.opengroup.org/onlinepubs/7908799/xsh/cbrt.html
https://reviews.llvm.org/D39481
More information about the cfe-commits
mailing list