[PATCH v2 00/10] Improve rounding to interger function for C23

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Apr 3 17:10:08 GMT 2024



On 03/04/24 12:03, Joseph Myers wrote:
> On Wed, 3 Apr 2024, Adhemerval Zanella wrote:
> 
>> As indicated by GCC documentation [1], ISO C23 does not allow that C
>> bindings ceil, floor, round, and trunc (in all floating point formats)
>> to raise inexact exceptions (different than ISO C99/C11 where this is
>> allowed).
>>
>> A recent MIPS patch to used some arch-specific instructions raised this
>> issue [1] and it was not caught because there was no proper testing. By
>> adding the missing tests, some implementations do indeed raise inexact
>> exceptions. 
> 
> There is testing that, in the terminology used by IEEE 754, the operations 
> do not raise the exception flag (the result of default exception handling 
> when the exception is signaled).  This is done through 
> NO_INEXACT_EXCEPTION in libm-test-*.inc.
> 
> What is not tested is specifically quality of implementation when 
> exception traps are enabled (a GNU extension outside the scope of the C 
> standard).

Ack, I will add that we are now testing for exception traps.

> 
> I think that as a user-visible fix, there should be a bug filed in 
> Bugzilla for this issue (that can then be marked FIXED so it goes in the 
> automatically generated list of bugs fixed in the next release).
> 

Alright, I open bug for the x86 issues.


More information about the Libc-alpha mailing list