summaryrefslogtreecommitdiffstats
path: root/gcc/print-tree.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-05 12:25:26 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-05 12:25:26 +0000
commit66d12a6c0042f50195e3775da6684f7455019f15 (patch)
tree7cf8c66a6e9e97bafc971ed6abd2828df8113d1e /gcc/print-tree.c
parent9608068808c1ecf65647ea53ba0d340467302e34 (diff)
downloadppe42-gcc-66d12a6c0042f50195e3775da6684f7455019f15.tar.gz
ppe42-gcc-66d12a6c0042f50195e3775da6684f7455019f15.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80430 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r--gcc/print-tree.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index 2fe09967d74..9dd9aaa2cd6 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -245,11 +245,12 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
indent_to (file, indent + 3);
}
- if (TREE_SIDE_EFFECTS (node))
+ if (!TYPE_P (node) && TREE_SIDE_EFFECTS (node))
fputs (" side-effects", file);
- if (TREE_READONLY (node))
+
+ if (TYPE_P (node) ? TYPE_READONLY (node) : TREE_READONLY (node))
fputs (" readonly", file);
- if (TREE_CONSTANT (node))
+ if (!TYPE_P (node) && TREE_CONSTANT (node))
fputs (" constant", file);
if (TREE_ADDRESSABLE (node))
fputs (" addressable", file);
OpenPOWER on IntegriCloud