public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [ubsan] Improve documentation of -fsanitize=undefined
@ 2013-07-31 12:25 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2013-07-31 12:25 UTC (permalink / raw)
  To: GCC Patches

This patch hopefully improves the documentation of the option in
question.

Applying to ubsan branch.

diff --git a/gcc/ChangeLog.ubsan b/gcc/ChangeLog.ubsan
index ac584ff..d7932c5 100644
--- a/gcc/ChangeLog.ubsan
+++ b/gcc/ChangeLog.ubsan
@@ -1,3 +1,7 @@
+2013-07-31  Marek Polacek  <polacek@redhat.com>
+
+       * doc/invoke.texi: Improve documentation of -fsanitize=undefined.
+
 2013-07-30  Marek Polacek  <polacek@redhat.com>
 
        * config/rs6000/rs6000.h (FRAME_GROWS_DOWNWARD): Use flag_sanitize
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 5dd9a62..652220b 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -5150,8 +5150,11 @@ See @uref{http://code.google.com/p/data-race-test/wiki/ThreadSanitizer} for 
 
 @item -fsanitize=undefined
 Enable UndefinedBehaviorSanitizer, a fast undefined behavior detector
-Various computations will be instrumented to detect
-undefined behavior, e.g.@: division by zero or various overflows.
+Various computations will be instrumented to detect undefined behavior
+at runtime, e.g.@: division by zero or various overflows.
+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 -fdump-final-insns@r{[}=@var{file}@r{]}
 @opindex fdump-final-insns

	Marek

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-31 12:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-31 12:25 [ubsan] Improve documentation of -fsanitize=undefined Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).