diff options
author | Brendan Kehoe <brendan@gcc.gnu.org> | 1992-09-07 19:42:39 -0400 |
---|---|---|
committer | Brendan Kehoe <brendan@gcc.gnu.org> | 1992-09-07 19:42:39 -0400 |
commit | 965718830570e0074b8992e7f08cddd2f1763d6c (patch) | |
tree | d06bb640f919af2bb4bb3d76199a7781d1466d33 /gcc | |
parent | 2a23183eba75e1b418b8a7ee83d1d1cf79aee9f7 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/c-common.c | 10 | ||||
-rw-r--r-- | gcc/c-typeck.c | 10 |
2 files changed, 10 insertions, 10 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; diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 6a0247a..145a27b 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -785,16 +785,6 @@ c_alignof (type) return size_int (TYPE_ALIGN (type) / BITS_PER_UNIT); } - -/* 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"); -} /* Implement the __alignof keyword: Return the minimum required alignment of EXPR, measured in bytes. For VAR_DECL's and |