diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-03 17:09:20 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-03 17:09:20 +0000 |
commit | e47a6f81edf98a062ad29cdb62590c1c7fdeb37a (patch) | |
tree | c67ebc05c0f9f25bf5e2c4cfeb978cad7945373c /gcc/tree.c | |
parent | 18f0b7df705aaa6f409645ea592934f2525e6333 (diff) | |
download | gcc-e47a6f81edf98a062ad29cdb62590c1c7fdeb37a.tar.gz |
* system.h (CONST_CAST2, CONST_CAST_TREE, CONST_CAST_RTX,
CONST_CAST_BB): New macros for type-specific casts.
(CONST_CAST): Add a TYPE parameter and define it in terms of
CONST_CAST2.
* c-decl.c (c_make_fname_decl): Supply a TYPE for CONST_CAST.
* c-lex.c (cb_ident, lex_string): Likewise,
* c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise,
* config/i386/i386.c (ix86_function_regparm,
ix86_function_sseregparm): Use CONST_CAST_TREE.
* config/mmix/mmix.c (mmix_encode_section_info): Supply a TYPE for
CONST_CAST.
* gcc.c (set_spec, read_specs, for_each_path, execute, do_spec_1,
give_switch, set_multilib_dir): Likewise,
* gengtype-parse.c (string_seq, typedef_name): Likewise,
* gimple-low.c (block_may_fallthru): Use CONST_CAST_TREE.
* jump.c (reversed_comparison_code_parts): Use CONST_CAST_RTX.
* passes.c (execute_one_pass): Supply a TYPE for CONST_CAST.
* prefix.c (update_path): Likewise,
* pretty-print.c (pp_base_destroy_prefix): Likewise,
* rtlanal.c (keep_with_call_p): Use CONST_CAST_RTX.
* tree-cfg.c (tree_can_merge_blocks_p,
tree_block_ends_with_condjump_p): Use CONST_CAST_BB.
* tree-eh.c (lookup_stmt_eh_region_fn): USe CONST_CAST_TREE.
* tree.c (build_string): Supply a TYPE for CONST_CAST.
(attribute_list_contained): Use CONST_CAST_TREE.
cp:
* call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
* decl.c (cp_make_fname_decl): Likewise,
* parser.c (cp_parser_string_literal): Likewise,
* tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
* typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
Likewise,
fortran:
* gfortranspec.c (lang_specific_driver): Use CONST_CAST2.
* options.c (gfc_post_options): Supply a TYPE for CONST_CAST.
* parse.c (parse_omp_structured_block): Likewise,
* st.c (gfc_free_statement): Likewise,
java:
* jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
CONST_CAST.
* jcf.h (JCF_FINISH): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128051 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index d04c1f0222b..289b5c95752 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -1194,8 +1194,8 @@ build_string (int len, const char *str) TREE_CONSTANT (s) = 1; TREE_INVARIANT (s) = 1; TREE_STRING_LENGTH (s) = len; - memcpy (CONST_CAST (TREE_STRING_POINTER (s)), str, len); - ((char *) CONST_CAST (TREE_STRING_POINTER (s)))[len] = '\0'; + memcpy (s->string.str, str, len); + s->string.str[len] = '\0'; return s; } @@ -4795,7 +4795,7 @@ attribute_list_contained (const_tree l1, const_tree l2) modify its argument and the return value is assigned to a const_tree. */ for (attr = lookup_attribute (IDENTIFIER_POINTER (TREE_PURPOSE (t2)), - (tree)CONST_CAST(l1)); + CONST_CAST_TREE(l1)); attr != NULL_TREE; attr = lookup_attribute (IDENTIFIER_POINTER (TREE_PURPOSE (t2)), TREE_CHAIN (attr))) |