invoke.texi: Document -fsanitize=signed-integer-overflow.

2013-12-05  Marek Polacek  <polacek@redhat.com>

	* doc/invoke.texi: Document -fsanitize=signed-integer-overflow.

From-SVN: r205721
This commit is contained in:
Marek Polacek 2013-12-05 22:51:11 +00:00 committed by Marek Polacek
parent 5cc2edcde4
commit 5ba505e708
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2013-12-05 Marek Polacek <polacek@redhat.com>
* doc/invoke.texi: Document -fsanitize=signed-integer-overflow.
2013-12-05 H.J. Lu <hongjiu.lu@intel.com>
* config.gcc: Support --with-cpu=ia.

View File

@ -5363,6 +5363,19 @@ built with this option turned on will issue an error message
when the end of a non-void function is reached without actually
returning a value. This option works in C++ only.
@item -fsanitize=signed-integer-overflow
@opindex fsanitize=signed-integer-overflow
This option enables signed integer overflow checking. We check that
the result of @code{+}, @code{*}, and both unary and binary @code{-}
does not overflow in the signed arithmetics. Note, integer promotion
rules must be taken into account. That is, the following is not an
overflow:
@smallexample
signed char a = SCHAR_MAX;
a++;
@end smallexample
@end table
While @option{-ftrapv} causes traps for signed overflows to be emitted,