From d539b114d4e0a82f888f08fce4dd4fd5824ae784 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Mon, 13 Feb 2006 01:57:29 +0000 Subject: invoke.texi (-Write-strings): Document that it is enabled by default. 2006-02-12 Gabriel Dos Reis * doc/invoke.texi (-Write-strings): Document that it is enabled by default. * c.opt (-Wwrite-strings): Declare variable warn_write_strings. Clarify documentation. * c-common.h (warn_write_strings): Remove. * c-common.c (warn_write_strings): Likewise. * c-opts.c (c_common_init_options): Enable -Wwrite-strings by default for C++. testsuite/ 2006-02-12 Gabriel Dos Reis * g++.dg/warn/no-write-strings.C: New test. * g++.dg/warn/write-strings.C: Likewise. * g++.dg/warn/write-strings-default.C: Likewise. From-SVN: r110907 --- gcc/c-opts.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/c-opts.c') diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 90862f6..00a8631 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -227,6 +227,7 @@ c_common_init_options (unsigned int argc, const char **argv) flag_exceptions = c_dialect_cxx (); warn_pointer_arith = c_dialect_cxx (); + warn_write_strings = c_dialect_cxx(); deferred_opts = XNEWVEC (struct deferred_opt, argc); -- cgit v1.1