[PATCH] These builtin functions set errno. Mark them accordingly.

Richard Smith richard at metafoo.co.uk
Mon Nov 24 12:46:19 PST 2014


>>! In D3806#12, @hfinkel wrote:
> The problem, as pointed out in the bug report, is that libstdc++ implements std::X in terms of __builtin_X

This is only non-conforming because `math_errhandling` is defined to a value that includes `MATH_ERRNO`. Another possible approach would be to subvert that macro instead of providing an `errno` guarantee in our builtins. Is there some reason we want to provide a guarantee that we set `errno` on domain error if the underlying libc does?

http://reviews.llvm.org/D3806






More information about the cfe-commits mailing list