------- Comment #2 from manu at gcc dot gnu dot org  2008-08-23 03:39 -------
-Wall does not include -Wwrite-strings. The docs are also correct but badly
worded.

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi (revision 139433)
+++ gcc/doc/invoke.texi (working copy)
@@ -3605,20 +3605,19 @@ two- or four-byte boundaries.

 @item -Wwrite-strings
 @opindex Wwrite-strings
 @opindex Wno-write-strings
 When compiling C, give string constants the type @code{const
[EMAIL PROTECTED] so that
-copying the address of one into a [EMAIL PROTECTED] @code{char *}
-pointer will get a warning; when compiling C++, warn about the
-deprecated conversion from string literals to @code{char *}.  This
-warning, by default, is enabled for C++ programs.
-These warnings will help you find at
-compile time code that can try to write into a string constant, but
-only if you have been very careful about using @code{const} in
-declarations and prototypes.  Otherwise, it will just be a nuisance;
-this is why we did not make @option{-Wall} request these warnings.
[EMAIL PROTECTED] so that copying the address of one into a
[EMAIL PROTECTED] @code{char *} pointer will get a warning. These
+warnings will help you find at compile time code that can try to write
+into a string constant, but only if you have been very careful about
+using @code{const} in declarations and prototypes.  Otherwise, it will
+just be a nuisance; this is why we did not make @option{-Wall} request
+these warnings.  When compiling C++, warn about the deprecated
+conversion from string literals to @code{char *}.  This warning is
+enabled by default for C++ programs.

 @item -Wclobbered
 @opindex Wclobbered
 @opindex Wno-clobbered
 Warn for variables that might be changed by @samp{longjmp} or


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org
         AssignedTo|unassigned at gcc dot gnu   |manu at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-08-23 03:39:15
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35648

Reply via email to