diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-08-23 15:36:32 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-08-23 15:36:32 +0000 |
commit | f4185118a442bf05af6b640909cd1dec96dc84e9 (patch) | |
tree | 62299d0978f29261eaa58e84b84e156cf5f51f4e | |
parent | 28c9884c6c2c548a8812b2ae20d9a7ff8e05e149 (diff) | |
download | gcc-f4185118a442bf05af6b640909cd1dec96dc84e9.zip gcc-f4185118a442bf05af6b640909cd1dec96dc84e9.tar.gz gcc-f4185118a442bf05af6b640909cd1dec96dc84e9.tar.bz2 |
re PR other/35648 (-Wall includes -Wwrite-strings)
2008-08-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 35648
* doc/invoke.texi (Wwrite-strings): Clarify description.
From-SVN: r139517
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 21 |
2 files changed, 16 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 06707dd..8f291e8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-08-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org> + + PR 35648 + * doc/invoke.texi (Wwrite-strings): Clarify description. + 2008-08-23 Ira Rosen <irar@il.ibm.com> PR tree-optimization/37174 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 1280e49..3b71fd3 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -3607,16 +3607,17 @@ two- or four-byte boundaries. @opindex Wwrite-strings @opindex Wno-write-strings When compiling C, give string constants the type @code{const -char[@var{length}]} so that -copying the address of one into a non-@code{const} @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. +char[@var{length}]} so that copying the address of one into a +non-@code{const} @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 |