diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-04-05 12:25:26 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-04-05 08:25:26 -0400 |
commit | 4f976745b7f4deeed63381e21990fd2a2c2e2103 (patch) | |
tree | 7cf8c66a6e9e97bafc971ed6abd2828df8113d1e /gcc/ada | |
parent | 5ffc47306c2e13f9d65d98f2a6fd3ea277945ce5 (diff) | |
download | gcc-4f976745b7f4deeed63381e21990fd2a2c2e2103.zip gcc-4f976745b7f4deeed63381e21990fd2a2c2e2103.tar.gz gcc-4f976745b7f4deeed63381e21990fd2a2c2e2103.tar.bz2 |
c-decl.c (build_compound_literal): Use TYPE_READONLY.
* c-decl.c (build_compound_literal): Use TYPE_READONLY.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
* objc/objc-act.c (adorn_decl, gen_declspecs): Likewise.
* c-typeck.c (decl_constant_value): Don't access DECL_INITIAL of a
PARM_DECL.
* calls.c (flags_from_decl_or_type): Use TYPE_READONLY and do so only
for a type.
* print-tree.c (print_node): Properly handle side-effects, readonly,
and constant flags.
* tree.c (build1_stat, build_expr_wfl): Only look at TREE_SIDE_EFFECTS
and TREE_CONSTANT if not a type.
* tree.h (IS_NON_TYPE_CODE_CLASS): New macro.
(IS_EXPR_CODE_CLASS): Write 'E', not 'e'.
(NON_TYPE_CHECK): New macro.
(TREE_SIDE_EFFECT, TREE_READONLY, TREE_CONSTANT: Add check.
* cp/init.c (decl_constant_value): Don't look at DECL_INITIAL
of PARM_DECL.
* cp/tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
or TREE_SIDE_EFFECTS of a type.
* ada/decl.c (gnat_to_gnu_entity): Use TYPE_READONLY.
* ada/utils.c (create_field_decl): Likewise.
* ada/utils2.c (build_unary_op, gnat_build_constructor): Likewise.
From-SVN: r80430
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/decl.c | 4 | ||||
-rw-r--r-- | gcc/ada/utils.c | 2 | ||||
-rw-r--r-- | gcc/ada/utils2.c | 4 |
4 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index aa8217d..1ff5439 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * decl.c (gnat_to_gnu_entity): Use TYPE_READONLY. + * utils.c (create_field_decl): Likewise. + * utils2.c (build_unary_op, gnat_build_constructor): Likewise. + 2004-04-02 Arnaud Charlet <charlet@act-europe.fr> * gnat-style.texi, gnat_rm.texi, gnat_ugn.texi: Remove RCS tags. diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index c7b66c7..5b0581f 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -1443,7 +1443,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) = create_concat_name (gnat_entity, "XUB"); TYPE_NAME (gnu_fat_type) = create_concat_name (gnat_entity, "XUP"); TYPE_IS_FAT_POINTER_P (gnu_fat_type) = 1; - TREE_READONLY (gnu_template_type) = 1; + TYPE_READONLY (gnu_template_type) = 1; /* Make a node for the array. If we are not defining the array suppress expanding incomplete types and save the node as the type @@ -1553,7 +1553,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) /* Install all the fields into the template. */ finish_record_type (gnu_template_type, gnu_template_fields, 0, 0); - TREE_READONLY (gnu_template_type) = 1; + TYPE_READONLY (gnu_template_type) = 1; /* Now make the array of arrays and update the pointer to the array in the fat pointer. Note that it is the first field. */ diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 0fe1892..1cefff8 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -1403,7 +1403,7 @@ create_field_decl (tree field_name, tree field_decl = build_decl (FIELD_DECL, field_name, field_type); DECL_CONTEXT (field_decl) = record_type; - TREE_READONLY (field_decl) = TREE_READONLY (field_type); + TREE_READONLY (field_decl) = TYPE_READONLY (field_type); /* If FIELD_TYPE is BLKmode, we must ensure this is aligned to at least a byte boundary since GCC cannot handle less-aligned BLKmode bitfields. */ diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c index 72ddfb1..3c0e26b 100644 --- a/gcc/ada/utils2.c +++ b/gcc/ada/utils2.c @@ -1234,7 +1234,7 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand) else { result = fold (build1 (op_code, TREE_TYPE (type), operand)); - TREE_READONLY (result) = TREE_READONLY (TREE_TYPE (type)); + TREE_READONLY (result) = TYPE_READONLY (TREE_TYPE (type)); } side_effects @@ -1521,7 +1521,7 @@ gnat_build_constructor (tree type, tree list) TREE_CONSTANT (result) = allconstant; TREE_STATIC (result) = allconstant; TREE_SIDE_EFFECTS (result) = side_effects; - TREE_READONLY (result) = TREE_READONLY (type); + TREE_READONLY (result) = TYPE_READONLY (type); return result; } |