c-semantics.c (build_stmt): Use TYPE_P instead of IS_NON_TYPE_CODE_CLASS.
authorKazu Hirata <kazu@cs.umass.edu>
Sat, 5 Mar 2005 20:21:31 +0000 (20:21 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Sat, 5 Mar 2005 20:21:31 +0000 (20:21 +0000)
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.

From-SVN: r95942

gcc/ChangeLog
gcc/c-semantics.c
gcc/java/ChangeLog
gcc/java/expr.c
gcc/tree.h

index 6e8b77fc0243d425c47dc08d1ed9a37bb9b02a2b..3224ef22489abd5d404c61763d17c9952c3bd07e 100644 (file)
@@ -1,3 +1,11 @@
+2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * 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  <phython@gcc.gnu.org>
 
        * doc/c-tree.texi: Wrap comments in @r{}.
index 658a12dcd2fba95bfe34d06d78f434ec1e4bfc75..ec902b617292bf220addbc0b92d143f4922c4250 100644 (file)
@@ -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;
     }
index cee0acb0947a1b034ccf1a3092697b79536e4ed1..8623ea36755f7ce718284f5f89a0cbc6e5bcb538 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
+       instead of IS_NON_TYPE_CODE_CLASS.
+
 2005-03-04  Andrew Haley  <aph@redhat.com>
 
         PR java/18362
index 7d515052ba0a5e6d4ce7fcc331d228e4579b4696..2c517a16f2d5c6a93aaa680f55edda982318a594 100644 (file)
@@ -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);
     }
index cb807eba4be7feef879ea26a6cf55f5920a9dce7..2592e613aeee2269eb1cedeeebeb70152f3441fc 100644 (file)
@@ -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; })