From 95784c5ab0159b527bcaa9b1116ad10d8d36ea5a Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Thu, 9 Oct 2014 08:51:00 +0000 Subject: [PATCH] * doc/invoke.texi: Document -fsanitize=bool and -fsanitize=enum. From-SVN: r216033 --- gcc/ChangeLog | 4 ++++ gcc/doc/invoke.texi | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3267a7a79ba..44cee4a5595 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-10-09 Marek Polacek + + * doc/invoke.texi: Document -fsanitize=bool and -fsanitize=enum. + 2014-10-08 Richard Biener PR tree-optimization/61969 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 5fe7e15b4e9..8f3eb16beb2 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -5604,6 +5604,19 @@ This option enables instrumentation of return statements in functions marked with @code{returns_nonnull} function attribute, to detect returning of null values from such functions. +@item -fsanitize=bool +@opindex fsanitize=bool + +This option enables instrumentation of loads from bool. If a value other +than 0/1 is loaded, a run-time error is issued. + +@item -fsanitize=enum +@opindex fsanitize=enum + +This option enables instrumentation of loads from an enum type. If +a value outside the range of values for the enum type is loaded, +a run-time error is issued. + @end table While @option{-ftrapv} causes traps for signed overflows to be emitted, -- 2.30.2