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, Apr 29, 2014 at 10:27:58AM +0200, Tobias Burnus wrote:
> Thus, I think Fortran users would also prefer not to have
> -fsanitize=undefined implying trapping dividing by zero.
> 
> Thus, I wonder whether it wouldn't be more useful to provide a command-line option
> to make the floating-point exceptions signalling - and to remind the users to link
> libbacktrace to get the trace.

That can be done independently with a different option, but -fsanitize=...
IMNSHO definitely shouldn't do anything with floating point control
registers.

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.

	Jakub


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