From 4f976745b7f4deeed63381e21990fd2a2c2e2103 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 5 Apr 2004 12:25:26 +0000 Subject: 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 --- gcc/objc/objc-act.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/objc') diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 8c65f08..1d89ad6 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -8099,9 +8099,9 @@ adorn_decl (tree decl, char *str) else if (code == POINTER_TYPE) { strcpy (tmpbuf, "*"); - if (TREE_READONLY (decl) || TYPE_VOLATILE (decl)) + if (TYPE_READONLY (decl) || TYPE_VOLATILE (decl)) { - if (TREE_READONLY (decl)) + if (TYPE_READONLY (decl)) strcat (tmpbuf, " const"); if (TYPE_VOLATILE (decl)) strcat (tmpbuf, " volatile"); @@ -8305,7 +8305,7 @@ gen_declspecs (tree declspecs, char *buf, int raw) else { /* Type qualifiers. */ - if (TREE_READONLY (declspecs)) + if (TYPE_READONLY (declspecs)) strcat (buf, "const "); if (TYPE_VOLATILE (declspecs)) strcat (buf, "volatile "); -- cgit v1.1