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: [PATCH] Implement -fsanitize=float-divide-by-zero


On Tue, 29 Apr 2014, Jakub Jelinek wrote:

> To my surprise, the wording in C99 or C++11 make even floating point
> division by zero undefined behavior, but I think generally at least for IEEE
> floating point semantics it is well defined, thus I think we shouldn't
> include it in -fsanitize=undefined.

Making Annex F explicitly take precedence over the generic text is DR#442.  
(This precedence issue applies to out-of-range conversions from floating 
point to integer as well as such things as floating-point division by 
zero: the generic text makes such out-of-range conversions undefined, but 
Annex F says they raise "invalid" and return an unspecified value.)

-- 
Joseph S. Myers
joseph@codesourcery.com


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