aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2006-06-23 21:17:53 +0000
committerJanis Johnson <janis@gcc.gnu.org>2006-06-23 21:17:53 +0000
commit5fc89bfdd7468927e0b3d5aabd5b73af60d9cebe (patch)
tree37c4db6e4704c909e6788fed55acb58ba4c4c1a2 /gcc/tree.h
parent17bbca74807b33cbebdea7761536468e147cf197 (diff)
downloadgcc-5fc89bfdd7468927e0b3d5aabd5b73af60d9cebe.zip
gcc-5fc89bfdd7468927e0b3d5aabd5b73af60d9cebe.tar.gz
gcc-5fc89bfdd7468927e0b3d5aabd5b73af60d9cebe.tar.bz2
tree.h (DECIMAL_FLOAT_TYPE_P): New.
* tree.h (DECIMAL_FLOAT_TYPE_P): New. * c-typeck.c (c_common_type): Disallow operations on decimal float types and other float types. * convert.c (convert_to_real): Don't ignore conversions involving decimal float types. testsuite: * gcc.dg/dfp/usual-arith-conv-bad.c: New test. From-SVN: r114951
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 6d8ad6a..06e6a96 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -966,6 +966,11 @@ extern void omp_clause_range_check_failed (const tree, const char *, int,
|| TREE_CODE (TYPE) == VECTOR_TYPE) \
&& SCALAR_FLOAT_TYPE_P (TREE_TYPE (TYPE))))
+/* Nonzero if TYPE represents a decimal floating-point type. */
+#define DECIMAL_FLOAT_TYPE_P(TYPE) \
+ (SCALAR_FLOAT_TYPE_P (TYPE) \
+ && DECIMAL_FLOAT_MODE_P (TYPE_MODE (TYPE)))
+
/* Nonzero if TYPE represents an aggregate (multi-component) type.
Keep these checks in ascending code order. */