Moved constant_expression_warning into c-common.c.

From-SVN: r2076
This commit is contained in:
Brendan Kehoe 1992-09-07 19:42:39 -04:00
parent 2a23183eba
commit 9657188305
2 changed files with 10 additions and 10 deletions

View File

@ -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;

View File

@ -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