From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id D36773840C15; Tue, 21 Jun 2022 10:33:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D36773840C15 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] fix #1263; wrapping gcc's "sorry_at" with "rust_sorry_at" X-Act-Checkin: gcc X-Git-Author: andrewnaguib <24280372+ndrwnaguib@users.noreply.github.com> X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: 76f7e45179de4e6e53caab104022cc0784ecd618 X-Git-Newrev: 94ac628fd2054a652f5ec1e96ab876ecb776a9ea Message-Id: <20220621103344.D36773840C15@sourceware.org> Date: Tue, 21 Jun 2022 10:33:44 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2022 10:33:44 -0000 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;