diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-26 15:43:50 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-26 15:43:50 +0000 |
commit | 1202e3922678520662e32b10472c3d3f37ac8a7a (patch) | |
tree | e677c2a2cecce758e9be195b1143cdb72174210c /gcc/cp/cvt.c | |
parent | 9de464a77de8b5ab8428ed269a853396d2d31fd0 (diff) | |
download | ppe42-gcc-1202e3922678520662e32b10472c3d3f37ac8a7a.tar.gz ppe42-gcc-1202e3922678520662e32b10472c3d3f37ac8a7a.zip |
* cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
* init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
* call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
before calling decl_constant_value.
* class.c (check_bitfield_decl): Likewise.
* cvt.c (ocp_convert): Likewise.
(convert): Likewise.
* decl.c (compute_array_index_type): Likewise.
(build_enumerator): Likewise.
* decl2.c (check_cp_case_value): Likewise.
* pt.c (convert_nontype_argument): Likewise.
(tsubst): Likewise.
* typeck.c (decay_conversion): Likewise.
(build_compound_expr): Likewise.
(build_reinterpret_cast): Likewise.
(build_c_cast): Likewise.
(convert_for_assignment): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33446 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 376cdaa3460..5a2964f6e3a 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -673,8 +673,7 @@ ocp_convert (type, expr, convtype, flags) complete_type (type); complete_type (TREE_TYPE (expr)); - if (TREE_READONLY_DECL_P (e)) - e = decl_constant_value (e); + e = decl_constant_value (e); if (IS_AGGR_TYPE (type) && (convtype & CONV_FORCE_TEMP) /* Some internal structures (vtable_entry_type, sigtbl_ptr_type) @@ -1003,8 +1002,7 @@ convert (type, expr) if (POINTER_TYPE_P (type) && POINTER_TYPE_P (intype)) { - if (TREE_READONLY_DECL_P (expr)) - expr = decl_constant_value (expr); + expr = decl_constant_value (expr); return fold (build1 (NOP_EXPR, type, expr)); } |