From 5dd4318b4440cdaf028e6f540bc7f341c1fcc6f3 Mon Sep 17 00:00:00 2001 From: kazu Date: Sat, 5 Mar 2005 20:21:31 +0000 Subject: [PATCH] gcc/ * c-semantics.c (build_stmt): Use TYPE_P instead of IS_NON_TYPE_CODE_CLASS. * tree.h (IS_NON_TYPE_CODE_CLASS): Remove. (NON_TYPE_CHECK): Use TYPE_P instead of IS_NON_TYPE_CODE_CLASS. java/ * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P instead of IS_NON_TYPE_CODE_CLASS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95942 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/c-semantics.c | 2 +- gcc/java/ChangeLog | 5 +++++ gcc/java/expr.c | 4 ++-- gcc/tree.h | 7 +------ 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e8b77fc0243..3224ef22489a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2005-03-05 Kazu Hirata + + * c-semantics.c (build_stmt): Use TYPE_P instead of + IS_NON_TYPE_CODE_CLASS. + * tree.h (IS_NON_TYPE_CODE_CLASS): Remove. + (NON_TYPE_CHECK): Use TYPE_P instead of + IS_NON_TYPE_CODE_CLASS. + 2005-03-05 James A. Morrison * doc/c-tree.texi: Wrap comments in @r{}. diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c index 658a12dcd2fb..ec902b617292 100644 --- a/gcc/c-semantics.c +++ b/gcc/c-semantics.c @@ -164,7 +164,7 @@ build_stmt (enum tree_code code, ...) for (i = 0; i < length; i++) { tree t = va_arg (p, tree); - if (t && IS_NON_TYPE_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (t)))) + if (t && !TYPE_P (t)) side_effects |= TREE_SIDE_EFFECTS (t); TREE_OPERAND (ret, i) = t; } diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index cee0acb0947a..8623ea36755f 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2005-03-05 Kazu Hirata + + * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P + instead of IS_NON_TYPE_CODE_CLASS. + 2005-03-04 Andrew Haley PR java/18362 diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 7d515052ba0a..2c517a16f2d5 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -3591,7 +3591,7 @@ build_expr_wfl (tree node, EXPR_WFL_NODE (wfl) = node; if (node) { - if (IS_NON_TYPE_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (node)))) + if (!TYPE_P (node)) TREE_SIDE_EFFECTS (wfl) = TREE_SIDE_EFFECTS (node); TREE_TYPE (wfl) = TREE_TYPE (node); } @@ -3627,7 +3627,7 @@ expr_add_location (tree node, source_location location, bool statement) EXPR_WFL_EMIT_LINE_NOTE (wfl) = 1; if (node) { - if (IS_NON_TYPE_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (node)))) + if (!TYPE_P (node)) TREE_SIDE_EFFECTS (wfl) = TREE_SIDE_EFFECTS (node); TREE_TYPE (wfl) = TREE_TYPE (node); } diff --git a/gcc/tree.h b/gcc/tree.h index cb807eba4be7..2592e613aeee 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -134,10 +134,6 @@ extern const enum tree_code_class tree_code_type[]; #define EXPRESSION_CLASS_P(CODE)\ (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_expression) -/* Returns nonzero iff CLASS is not the tree code of a type. */ - -#define IS_NON_TYPE_CODE_CLASS(CLASS) ((CLASS) != tcc_type) - /* Returns nonzero iff CODE represents a type or declaration. */ #define IS_TYPE_OR_DECL_P(CODE)\ @@ -557,8 +553,7 @@ struct tree_common GTY(()) /* These checks have to be special cased. */ #define NON_TYPE_CHECK(T) __extension__ \ ({ const tree __t = (T); \ - char const __c = TREE_CODE_CLASS (TREE_CODE (__t)); \ - if (!IS_NON_TYPE_CODE_CLASS (__c)) \ + if (TYPE_P (__t)) \ tree_class_check_failed (__t, tcc_type, __FILE__, __LINE__, \ __FUNCTION__); \ __t; }) -- 2.11.4.GIT