aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorandrewnaguib <24280372+ndrwnaguib@users.noreply.github.com>2022-06-17 06:47:17 -0700
committerandrewnaguib <24280372+ndrwnaguib@users.noreply.github.com>2022-06-17 06:52:58 -0700
commit94ac628fd2054a652f5ec1e96ab876ecb776a9ea (patch)
treef632bc8a9e61fed8b3a845eec6231a1707413de3 /gcc
parent76f7e45179de4e6e53caab104022cc0784ecd618 (diff)
downloadgcc-94ac628fd2054a652f5ec1e96ab876ecb776a9ea.zip
gcc-94ac628fd2054a652f5ec1e96ab876ecb776a9ea.tar.gz
gcc-94ac628fd2054a652f5ec1e96ab876ecb776a9ea.tar.bz2
fix #1263; wrapping gcc's "sorry_at" with "rust_sorry_at"
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/rust-diagnostics.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/rust-diagnostics.h b/gcc/rust/rust-diagnostics.h
index f7a3856..93bd1b3 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;