This is the mail archive of the gcc@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: Miscompilation of remainder expressions


> 
> Vincent Lefevre <vincent+gcc@vinc17.org> writes:
> 
> | On 2007-01-16 13:41:16 -0800, Ian Lance Taylor wrote:
> | > To be clear, in my opinion, this should always be selected by an
> | > option, it should never be default behaviour for any target.
> | 
> | I disagree. One should get correct results by default.
> 
> Once we have an implemented solution, we can quibble over whether it
> should be on by default or not.  That debate will be supported by
> sample of hard data.  Once we have an implementation.

I wonder why the call to div/ldiv/lldiv says the behavior is undefined while
% is defined, that seems wrong.

The specific wording from the standard is "If either part of the result
cannot be represented, the behavior is undefined." So why is % different
from those functions?

-- Pinski


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