On Thu, Oct 8, 2015 at 7:23 AM, Marshall Clow <mclow.li...@gmail.com> wrote:
> On Tue, Oct 6, 2015 at 3:36 PM, Richard Smith <rich...@metafoo.co.uk> > wrote: > >> Split <math.h> out of <cmath>. This is a big change, but the same pattern >> as the prior ones. >> >> In this patch, you replicate the #ifdef XXX, __libcpp_XXX, #undef XXX > dance for all the isXXX functions. Is that because they're not required to > be actual functions in a C library? > Yes. Per C11 7.12.3, the following are defined as type-generic macros that take any real floating-point type: fpclassify, isfinite, isinf, isnan, isnormal, signbit Per C11 7.12.14, the following are defined as type-generic macros that take any pair of real floating-point types: isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered Per [c.math]p10, we are required to remove those macros and replace them with a set of overloaded functions. For those cases (and *only* those cases), we define a function template to capture the contents of the macro, then undefine the macro. Note that libc++'s behavior here is non-conforming (both before and after this change) because it's required to provide a specific set of overloads, but instead only provides a template. This patch series neither improves nor regresses libc++'s conformance in that area. > Other than that Q, LGTM. Like the extended tests. > > -- Marshall >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits