aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-constexpr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-constexpr.cc')
-rw-r--r--gcc/rust/backend/rust-constexpr.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-constexpr.cc
index 1b0515e..aee41e4 100644
--- a/gcc/rust/backend/rust-constexpr.cc
+++ b/gcc/rust/backend/rust-constexpr.cc
@@ -59,17 +59,7 @@ ConstCtx::constexpr_expression (tree t)
{
if (TREE_OVERFLOW (t))
{
- rust_error_at (Location (loc), "overflow in constant expression");
- return t;
- }
-
- if (TREE_CODE (t) == INTEGER_CST && TYPE_PTR_P (TREE_TYPE (t))
- && !integer_zerop (t))
- {
- // FIXME check does this actually work to print out tree types
- rust_error_at (Location (loc),
- "value %qE of type %qT is not a constant expression",
- t, TREE_TYPE (t));
+ error_at (loc, "overflow in constant expression");
return t;
}