diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-04-26 19:01:42 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-04-26 19:01:42 -0400 |
commit | 8729113865444cd9afe48970e6f813a982583eb0 (patch) | |
tree | 9d0b827e5518a732810c5790abe1460c0dead71f /gcc/tree.h | |
parent | 87d348780e626fb90078658ef4d1ca3751773091 (diff) | |
download | gcc-8729113865444cd9afe48970e6f813a982583eb0.zip gcc-8729113865444cd9afe48970e6f813a982583eb0.tar.gz gcc-8729113865444cd9afe48970e6f813a982583eb0.tar.bz2 |
(INTEGRAL_TYPE_P, FLOAT_TYPE_P): New macros.
From-SVN: r4240
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -205,6 +205,21 @@ struct tree_common && (TREE_TYPE (EXP) \ == TREE_TYPE (TREE_OPERAND (EXP, 0)))) \ (EXP) = TREE_OPERAND (EXP, 0); + +/* Nonzero if TYPE represents an integral type. Note that we do not + include COMPLEX types here. */ + +#define INTEGRAL_TYPE_P(TYPE) \ + (TREE_CODE (TYPE) == INTEGER_TYPE || TREE_CODE (TYPE) == ENUMERAL_TYPE \ + || TREE_CODE (TYPE) == BOOLEAN_TYPE || TREE_CODE (TYPE) == CHAR_TYPE) + +/* Nonzero if TYPE represents a floating-point type, including complex + floating-point types. */ + +#define FLOAT_TYPE_P(TYPE) \ + (TREE_CODE (TYPE) == REAL_TYPE \ + || (TREE_CODE (TYPE) == COMPLEX_TYPE \ + && TREE_CODE (TREE_TYPE (TYPE)) == REAL_TYPE)) /* Define many boolean fields that all tree nodes have. */ |