Commit e71d7987 by Marek Polacek Committed by Marek Polacek

invoke.texi (-fsanitize=bounds): Tweak wording.

	* doc/invoke.texi (-fsanitize=bounds): Tweak wording.
	(-fsanitize=float-divide-by-zero): Move to the table with
	-fsanitize=undefined suboptions.
	(-fsanitize=float-cast-overflow): Likewise.

From-SVN: r212260
parent 283bbe35
2014-07-03 Marek Polacek <polacek@redhat.com>
* doc/invoke.texi (-fsanitize=bounds): Tweak wording.
(-fsanitize=float-divide-by-zero): Move to the table with
-fsanitize=undefined suboptions.
(-fsanitize=float-cast-overflow): Likewise.
2014-07-03 Maciej W. Rozycki <macro@codesourcery.com> 2014-07-03 Maciej W. Rozycki <macro@codesourcery.com>
* config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Use * config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Use
......
...@@ -5400,26 +5400,22 @@ at runtime. Current suboptions are: ...@@ -5400,26 +5400,22 @@ at runtime. Current suboptions are:
@item -fsanitize=shift @item -fsanitize=shift
@opindex fsanitize=shift @opindex fsanitize=shift
This option enables checking that the result of a shift operation is This option enables checking that the result of a shift operation is
not undefined. Note that what exactly is considered undefined differs not undefined. Note that what exactly is considered undefined differs
slightly between C and C++, as well as between ISO C90 and C99, etc. slightly between C and C++, as well as between ISO C90 and C99, etc.
@item -fsanitize=integer-divide-by-zero @item -fsanitize=integer-divide-by-zero
@opindex fsanitize=integer-divide-by-zero @opindex fsanitize=integer-divide-by-zero
Detect integer division by zero as well as @code{INT_MIN / -1} division. Detect integer division by zero as well as @code{INT_MIN / -1} division.
@item -fsanitize=unreachable @item -fsanitize=unreachable
@opindex fsanitize=unreachable @opindex fsanitize=unreachable
With this option, the compiler will turn the @code{__builtin_unreachable} With this option, the compiler will turn the @code{__builtin_unreachable}
call into a diagnostics message call instead. When reaching the call into a diagnostics message call instead. When reaching the
@code{__builtin_unreachable} call, the behavior is undefined. @code{__builtin_unreachable} call, the behavior is undefined.
@item -fsanitize=vla-bound @item -fsanitize=vla-bound
@opindex fsanitize=vla-bound @opindex fsanitize=vla-bound
This option instructs the compiler to check that the size of a variable This option instructs the compiler to check that the size of a variable
length array is positive. This option does not have any effect in length array is positive. This option does not have any effect in
@option{-std=c++1y} mode, as the standard requires the exception be thrown @option{-std=c++1y} mode, as the standard requires the exception be thrown
...@@ -5427,7 +5423,6 @@ instead. ...@@ -5427,7 +5423,6 @@ instead.
@item -fsanitize=null @item -fsanitize=null
@opindex fsanitize=null @opindex fsanitize=null
This option enables pointer checking. Particularly, the application This option enables pointer checking. Particularly, the application
built with this option turned on will issue an error message when it built with this option turned on will issue an error message when it
tries to dereference a NULL pointer, or if a reference (possibly an tries to dereference a NULL pointer, or if a reference (possibly an
...@@ -5435,7 +5430,6 @@ rvalue reference) is bound to a NULL pointer. ...@@ -5435,7 +5430,6 @@ rvalue reference) is bound to a NULL pointer.
@item -fsanitize=return @item -fsanitize=return
@opindex fsanitize=return @opindex fsanitize=return
This option enables return statement checking. Programs This option enables return statement checking. Programs
built with this option turned on will issue an error message built with this option turned on will issue an error message
when the end of a non-void function is reached without actually when the end of a non-void function is reached without actually
...@@ -5443,7 +5437,6 @@ returning a value. This option works in C++ only. ...@@ -5443,7 +5437,6 @@ returning a value. This option works in C++ only.
@item -fsanitize=signed-integer-overflow @item -fsanitize=signed-integer-overflow
@opindex fsanitize=signed-integer-overflow @opindex fsanitize=signed-integer-overflow
This option enables signed integer overflow checking. We check that This option enables signed integer overflow checking. We check that
the result of @code{+}, @code{*}, and both unary and binary @code{-} the result of @code{+}, @code{*}, and both unary and binary @code{-}
does not overflow in the signed arithmetics. Note, integer promotion does not overflow in the signed arithmetics. Note, integer promotion
...@@ -5456,20 +5449,12 @@ a++; ...@@ -5456,20 +5449,12 @@ a++;
@item -fsanitize=bounds @item -fsanitize=bounds
@opindex fsanitize=bounds @opindex fsanitize=bounds
This option enables instrumentation of array bounds. Various out of bounds This option enables instrumentation of array bounds. Various out of bounds
accesses are detected. Flexible array members are not instrumented, as well accesses are detected. Flexible array members and initializers of variables
as initializers of variables with static storage. with static storage are not instrumented.
@end table
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 @item -fsanitize=float-divide-by-zero
@opindex fsanitize=float-divide-by-zero @opindex fsanitize=float-divide-by-zero
Detect floating-point division by zero. Unlike other similar options, Detect floating-point division by zero. Unlike other similar options,
@option{-fsanitize=float-divide-by-zero} is not enabled by @option{-fsanitize=float-divide-by-zero} is not enabled by
@option{-fsanitize=undefined}, since floating-point division by zero can @option{-fsanitize=undefined}, since floating-point division by zero can
...@@ -5477,11 +5462,16 @@ be a legitimate way of obtaining infinities and NaNs. ...@@ -5477,11 +5462,16 @@ be a legitimate way of obtaining infinities and NaNs.
@item -fsanitize=float-cast-overflow @item -fsanitize=float-cast-overflow
@opindex fsanitize=float-cast-overflow @opindex fsanitize=float-cast-overflow
This option enables floating-point type to integer conversion checking. This option enables floating-point type to integer conversion checking.
We check that the result of the conversion does not overflow. We check that the result of the conversion does not overflow.
This option does not work well with @code{FE_INVALID} exceptions enabled. This option does not work well with @code{FE_INVALID} exceptions enabled.
@end table
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-recover @item -fsanitize-recover
@opindex fsanitize-recover @opindex fsanitize-recover
By default @option{-fsanitize=undefined} sanitization (and its suboptions By default @option{-fsanitize=undefined} sanitization (and its suboptions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment