diff options
author | Jason Merrill <jason@gcc.gnu.org> | 1998-08-23 22:08:45 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-08-23 22:08:45 -0400 |
commit | d9cf7c824593edf5fba4c00f41eaa1e791855c3e (patch) | |
tree | a665b0240e32b8e9553746924e2725aa56002700 /gcc/c-decl.c | |
parent | df44f2b0e98dccd15796b2e9af364c1704fba95e (diff) | |
download | gcc-d9cf7c824593edf5fba4c00f41eaa1e791855c3e.zip gcc-d9cf7c824593edf5fba4c00f41eaa1e791855c3e.tar.gz gcc-d9cf7c824593edf5fba4c00f41eaa1e791855c3e.tar.bz2 |
c-common.c (combine_strings): Also set TREE_READONLY.
* c-common.c (combine_strings): Also set TREE_READONLY.
Change warn_write_strings to flag_const_strings.
* c-decl.c, c-tree.h: Likewise.
cp/
* tree.c (lvalue_type): Fix for arrays.
* typeck.c (string_conv_p): New fn.
(convert_for_assignment): Use it.
(build_unary_op): Use lvalue_type.
* call.c (standard_conversion, convert_like): Use string_conv_p.
(add_function_candidate): Use lvalue_type.
* cvt.c (convert_to_reference): Likewise.
* decl2.c (lang_decode_option): Ignore -traditional.
* decl.c (init_decl_processing): flag_writable_strings inhibits
flag_const_strings.
* lang-options.h (lang_options): Add fconst-strings to the list
of valid options.
* decl2.c (lang_f_options, lang_decode_option): Likewise.
From-SVN: r21928
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 1b040b1..9f880c3 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -498,7 +498,7 @@ int mesg_implicit_function_declaration; to get extra warnings from them. These warnings will be too numerous to be useful, except in thoroughly ANSIfied programs. */ -int warn_write_strings; +int flag_const_strings; /* Nonzero means warn about pointer casts that can drop a type qualifier from the pointer target type. */ @@ -713,9 +713,9 @@ c_decode_option (argc, argv) else if (!strcmp (p, "-Wno-long-long")) warn_long_long = 0; else if (!strcmp (p, "-Wwrite-strings")) - warn_write_strings = 1; + flag_const_strings = 1; else if (!strcmp (p, "-Wno-write-strings")) - warn_write_strings = 0; + flag_const_strings = 0; else if (!strcmp (p, "-Wcast-qual")) warn_cast_qual = 1; else if (!strcmp (p, "-Wno-cast-qual")) |