From fb90f9f3aeccc0cb3178e3179c8ef08ec5941cdd Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Fri, 2 May 2014 08:24:49 +0000 Subject: [PATCH] * doc/invoke.texi: Describe -fsanitize=float-divide-by-zero. From-SVN: r210002 --- gcc/ChangeLog | 4 ++++ gcc/doc/invoke.texi | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6cc7dc488d65..817fb2629f41 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-05-02 Marek Polacek + + * doc/invoke.texi: Describe -fsanitize=float-divide-by-zero. + 2014-02-26 Kito Cheng * defaults.h (HONOR_REG_ALLOC_ORDER): Change HONOR_REG_ALLOC_ORDER diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 0eba1e0a162c..3fe9d5f302cc 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -5393,6 +5393,14 @@ While @option{-ftrapv} causes traps for signed overflows to be emitted, @option{-fsanitize=undefined} gives a diagnostic message. This currently works only for the C family of languages. +@item -fsanitize=float-divide-by-zero +@opindex fsanitize=float-divide-by-zero + +Detect floating-point division by zero. Unlike other similar options, +@option{-fsanitize=float-divide-by-zero} is not enabled by +@option{-fsanitize=undefined}, since floating-point division by zero can +be a legitimate way of obtaining infinities and NaNs. + @item -fsanitize-recover @opindex fsanitize-recover By default @option{-fsanitize=undefined} sanitization (and its suboptions -- 2.47.3