This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Don't treat rint as setting errno


On 11/06/2015 04:02 PM, Richard Sandiford wrote:
builtins.def says that rint sets errno, but it looks like this might
be a mistake.  C99 says that rint doesn't set errno and the builtins.c
expansion code doesn't try to keep errno up to date.

[snip explanation of the history]

FWIW the manpage has this to say:

"SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense."

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
OK to install?

Ok.


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]