public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] fix #1263; wrapping gcc's "sorry_at" with "rust_sorry_at"
@ 2022-06-21 10:33 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-21 10:33 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:94ac628fd2054a652f5ec1e96ab876ecb776a9ea

commit 94ac628fd2054a652f5ec1e96ab876ecb776a9ea
Author: andrewnaguib <24280372+ndrwnaguib@users.noreply.github.com>
Date:   Fri Jun 17 06:47:17 2022 -0700

    fix #1263; wrapping gcc's "sorry_at" with "rust_sorry_at"

Diff:
---
 gcc/rust/rust-diagnostics.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/rust/rust-diagnostics.h b/gcc/rust/rust-diagnostics.h
index f7a3856894b..93bd1b3237b 100644
--- a/gcc/rust/rust-diagnostics.h
+++ b/gcc/rust/rust-diagnostics.h
@@ -142,6 +142,11 @@ struct Error
 // rust_debug uses normal printf formatting, not GCC diagnostic formatting.
 #define rust_debug(...) rust_debug_loc (Location (), __VA_ARGS__)
 
+// rust_sorry_at wraps GCC diagnostic "sorry_at" to accept "Location" instead of
+// "location_t"
+#define rust_sorry_at(location, ...)                                           \
+  sorry_at (location.gcc_location (), __VA_ARGS__)
+
 void
 rust_debug_loc (const Location location, const char *fmt,
 		...) ATTRIBUTE_PRINTF_2;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-21 10:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21 10:33 [gcc/devel/rust/master] fix #1263; wrapping gcc's "sorry_at" with "rust_sorry_at" Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).