[PATCH] Clarify -Wuninitialized doc

Devang Patel dpatel@apple.com
Thu Apr 13 01:07:00 GMT 2006

GCC issues one warning when -Wuninitialized is used without -O.

        * doc/invoke.texi (-Wuninitialized): Clarify -O connection.

Tested by doing 'make' on powerpc-darwin.

OK ?

:ADDPATCH man page:

Index: invoke.texi
--- invoke.texi (revision 112910)
+++ invoke.texi (working copy)
@@ -2683,7 +2683,9 @@ if a variable may be clobbered by a @cod
These warnings are possible only in optimizing compilation,
because they require data flow information that is computed only
when optimizing.  If you don't specify @option{-O}, you simply won't
-get these warnings.
+get these warnings about uninitialized variables. However, in this case
+GCC issues warning about @option{-Wuninitialized} is not supported
+without @option{-O}.
If you want to warn about code which uses the uninitialized value of the
variable in its own initializer, use the @option{-Winit-self} option.

More information about the Gcc-patches mailing list