aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@gcc.gnu.org>1992-09-07 19:42:39 -0400
committerBrendan Kehoe <brendan@gcc.gnu.org>1992-09-07 19:42:39 -0400
commit965718830570e0074b8992e7f08cddd2f1763d6c (patch)
treed06bb640f919af2bb4bb3d76199a7781d1466d33 /gcc/c-common.c
parent2a23183eba75e1b418b8a7ee83d1d1cf79aee9f7 (diff)
downloadgcc-965718830570e0074b8992e7f08cddd2f1763d6c.zip
gcc-965718830570e0074b8992e7f08cddd2f1763d6c.tar.gz
gcc-965718830570e0074b8992e7f08cddd2f1763d6c.tar.bz2
Moved constant_expression_warning into c-common.c.
From-SVN: r2076
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index b3579f6..f647b40 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -281,6 +281,16 @@ decl_attributes (decl, attributes)
}
}
+/* Print a warning if a constant expression had overflow in folding. */
+
+void
+constant_expression_warning (value)
+ tree value;
+{
+ if (TREE_CODE (value) == INTEGER_CST && TREE_CONSTANT_OVERFLOW (value))
+ pedwarn ("overflow in constant expression");
+}
+
void
c_expand_expr_stmt (expr)
tree expr;