[PATCH] D39481: [CodeGen] fix const-ness of builtin equivalents of <math.h> and <complex.h> functions that might set errno

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 1 12:12:57 PDT 2017


efriedma added a comment.

I think we should assume libm complies with the C99 standard (specifically, the appendix specifying the behavior of IEEE floating-point).  Otherwise, we have no basis to predict the behavior of any standard library call.

>From the standard: "Functions with a NaN argument return a NaN result and raise no floating-point exception, except where stated otherwise."


https://reviews.llvm.org/D39481





More information about the cfe-commits mailing list