tree.h (IS_EXPR_CODE_CLASS): Use strchr.
authorJason Merrill <jason@redhat.com>
Tue, 21 Oct 2003 22:14:53 +0000 (18:14 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 21 Oct 2003 22:14:53 +0000 (18:14 -0400)
        * tree.h (IS_EXPR_CODE_CLASS): Use strchr.
        (EXPR_P): New macro.

From-SVN: r72773

gcc/ChangeLog
gcc/tree.h

index 36c3936..4683e59 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-21  Jason Merrill  <jason@redhat.com>
+
+       * tree.h (IS_EXPR_CODE_CLASS): Use strchr.
+       (EXPR_P): New macro.
+
 2003-10-21  Zack Weinberg  <zack@codesourcery.com>
 
        * config/ia64/ia64.md (cmpxchg_acq_si): Mark operand 3 as DImode.
index d46e60a..c240e92 100644 (file)
@@ -56,9 +56,11 @@ extern const char tree_code_type[];
 /* Returns nonzero iff CLASS is the tree-code class of an
    expression.  */
 
-#define IS_EXPR_CODE_CLASS(CLASS) \
-  ((CLASS) == '<' || (CLASS) == '1' || (CLASS) == '2' || (CLASS) == 'e' \
-   || (CLASS) == 'r' || (CLASS) == 's')
+#define IS_EXPR_CODE_CLASS(CLASS) (strchr ("<12ers", (CLASS)) != 0)
+
+/* Returns nonzero iff NODE is an expression of some kind.  */
+
+#define EXPR_P(NODE) IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (NODE)))
 
 /* Number of argument-words in each kind of tree-node.  */