mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-18 03:10:26 +08:00
re PR c++/8586 (-Wwrite-strings should be included in -Wall)
2006-11-19 Gabriel Dos Reis <gdr@integrable-solutions.net> PR c++/8586 * c-opts.c (c_common_handle_option): Enable -Wwrite-strings if -Wall. testsuite/ 2006-11-19 Gabriel Dos Reis <gdr@integrable-solutions.net> PR c++/8586 * g++.dg/warn/Wall-write-strings.C: New. From-SVN: r119009
This commit is contained in:
parent
e5dfa5b1be
commit
7f420d0d64
@ -1,3 +1,8 @@
|
||||
2006-11-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
PR c++/8586
|
||||
* c-opts.c (c_common_handle_option): Enable -Wwrite-strings if -Wall.
|
||||
|
||||
2006-11-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
PR target/29114
|
||||
|
@ -416,6 +416,8 @@ c_common_handle_option (size_t scode, const char *arg, int value)
|
||||
/* C++-specific warnings. */
|
||||
warn_reorder = value;
|
||||
warn_nontemplate_friend = value;
|
||||
if (value > 0)
|
||||
warn_write_strings = true;
|
||||
}
|
||||
|
||||
cpp_opts->warn_trigraphs = value;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-11-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
PR c++/8586
|
||||
* g++.dg/warn/Wall-write-strings.C: New.
|
||||
|
||||
2006-11-19 Erik Edelmann <eedelman@gcc.gnu.org>
|
||||
|
||||
* gfortran.dg/alloc_comp_constraint_5.f90: New.
|
||||
|
7
gcc/testsuite/g++.dg/warn/Wall-write-strings.C
Normal file
7
gcc/testsuite/g++.dg/warn/Wall-write-strings.C
Normal file
@ -0,0 +1,7 @@
|
||||
// PR 8586
|
||||
// { dg-do compile }
|
||||
// { dg-options "-Wall" }
|
||||
|
||||
char* foo = "foo"; // { dg-warning "" }
|
||||
const char* bar = "bar";
|
||||
|
Loading…
x
Reference in New Issue
Block a user