aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-constexpr.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-08-25 13:19:54 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-08-25 14:51:26 +0100
commit43b7dd91fb0df9cdb7708581089bd3cd36f14a43 (patch)
tree8022decec0ee50de00c443fd254c0af967b5fdd7 /gcc/rust/backend/rust-constexpr.cc
parentc52268c6d22bcecef596dffd3c31b78d225f59b6 (diff)
downloadgcc-43b7dd91fb0df9cdb7708581089bd3cd36f14a43.zip
gcc-43b7dd91fb0df9cdb7708581089bd3cd36f14a43.tar.gz
gcc-43b7dd91fb0df9cdb7708581089bd3cd36f14a43.tar.bz2
Fix warnings on diagnostics
Diffstat (limited to 'gcc/rust/backend/rust-constexpr.cc')
-rw-r--r--gcc/rust/backend/rust-constexpr.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-constexpr.cc
index 87b1a84..f2e3e51 100644
--- a/gcc/rust/backend/rust-constexpr.cc
+++ b/gcc/rust/backend/rust-constexpr.cc
@@ -4539,10 +4539,14 @@ is_valid_constexpr_fn (tree fun, bool complain)
ret = false;
if (complain)
{
- auto_diagnostic_group d;
- error ("invalid type for parameter %d of %<constexpr%> "
- "function %q+#D",
- DECL_PARM_INDEX (parm), fun);
+ // auto_diagnostic_group d;
+ // error ("invalid type for parameter %d of %<constexpr%> "
+ // "function %q+#D",
+ // DECL_PARM_INDEX (parm), fun);
+ Location locus = Location (DECL_SOURCE_LOCATION (fun));
+ rust_error_at (
+ locus, "invalid type for parameter %d of %<constexpr%> function",
+ DECL_PARM_INDEX (parm));
}
}