diff options
author | Zack Weinberg <zack@codesourcery.com> | 2004-02-23 21:43:18 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-02-23 21:43:18 +0000 |
commit | 3521b33c2fcc3f132e9b643042dad7caa5e46b15 (patch) | |
tree | 796f91d81523d174b9d97e4a2c0bf9200c831f94 /gcc/c-common.c | |
parent | eac8a696d5418a3bd48d41980b2dc3095f711778 (diff) | |
download | gcc-3521b33c2fcc3f132e9b643042dad7caa5e46b15.zip gcc-3521b33c2fcc3f132e9b643042dad7caa5e46b15.tar.gz gcc-3521b33c2fcc3f132e9b643042dad7caa5e46b15.tar.bz2 |
Remove -fwritable-strings.
gcc/
Remove -fwritable-strings.
* c-common.c (fix_string_type): Don't check
flag_writable_strings.
(fix_string_type): Likewise.
* c-opts.c (set_std_c89): Don't initialize
flag_writable_strings.
(set_std_c99): Likewise.
* common.opt (fwritable-strings): Remove.
* flags.h: Remove the external declaration of
flag_writable_strings.
* opts.c (common_handle_option) <OPT_fwritable_strings>:
Remove.
* toplev.c (flag_writable_strings): Remove.
(f_options): Remove an entry for writable-strings.
* varasm.c (const_hash_1) <STRING_CST>: Don't check
flag_writable_strings.
(compare_constant) <STRING_CST>: Likewise.
(build_constant_desc): Likewise.
* config/darwin.c (machopic_select_section): Likewise.
* config/arm/arm.c (AOF_ASSEMBLER): Likewise.
* config/arm/pe.c (arm_pe_encode_section_info): Likewise.
* config/iq2000/iq2000.c (iq2000_select_section): Likewise.
* config/mips/mips.c (mips_select_section): Likewise.
(mips_encode_section_info): Likewise.
* config/pa/pa.c (pa_select_section): Likewise.
* config/pa/pa.h (TEXT_SPACE_P): Likewise.
* config/v850/v850.c (v850_select_section): Likewise.
* doc/invoke.texi (-fwritable-strings): Remove.
(-fno-const-strings): Don't mention -fwritable-strings.
* doc/trouble.texi: Don't mention -fwritable-strings.
gcc/cp/
* decl.c (cxx_init_decl_processing): Don't check
flag_writable_strings.
gcc/testsuite/
* gcc.dg/fwritable-strings-1.c: Remove.
Co-Authored-By: Kazu Hirata <kazu@cs.umass.edu>
From-SVN: r78333
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 2ebb915..3d9dbfa 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1164,7 +1164,7 @@ fix_string_type (tree value) -Wwrite-strings says make the string constant an array of const char so that copying it to a non-const pointer will get a warning. For C++, this is the standard behavior. */ - if (flag_const_strings && ! flag_writable_strings) + if (flag_const_strings) { tree elements = build_type_variant (wide_flag ? wchar_type_node : char_type_node, @@ -1179,7 +1179,7 @@ fix_string_type (tree value) build_index_type (build_int_2 (nchars - 1, 0))); TREE_CONSTANT (value) = 1; - TREE_READONLY (value) = ! flag_writable_strings; + TREE_READONLY (value) = 1; TREE_STATIC (value) = 1; return value; } |