public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/google/grte/v5-2.27/master] Apply upstream commit __builtin_FILE commit to GRTEv5. Date: Fri, 10 Feb 2023 20:43:55 +0000 (GMT) [thread overview] Message-ID: <20230210204355.D09C83858414@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2dda6eab5228f99a30c8102c697592a3901e069c commit 2dda6eab5228f99a30c8102c697592a3901e069c Author: Paul Pluzhnikov <ppluzhnikov@google.com> Date: Fri Feb 10 20:40:56 2023 +0000 Apply upstream commit __builtin_FILE commit to GRTEv5. https://sourceware.org/git/?p=glibc.git;a=commit;h=e42ec822190056895e55e5140ce2304e67e34445 Diff: --- assert/assert.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/assert/assert.h b/assert/assert.h index 5468c16c2c..f48401c008 100644 --- a/assert/assert.h +++ b/assert/assert.h @@ -86,10 +86,21 @@ __END_DECLS parentheses around EXPR. Otherwise, those added parentheses would suppress warnings we'd expect to be detected by gcc's -Wparentheses. */ # if defined __cplusplus +# if defined __has_builtin +# if __has_builtin (__builtin_FILE) +# define __ASSERT_FILE __builtin_FILE () +# define __ASSERT_LINE __builtin_LINE () +# endif +# endif +# if !defined __ASSERT_FILE +# define __ASSERT_FILE __FILE__ +# define __ASSERT_LINE __LINE__ +# endif # define assert(expr) \ (static_cast <bool> (expr) \ ? void (0) \ - : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION)) + : __assert_fail (#expr, __ASSERT_FILE, __ASSERT_LINE, \ + __ASSERT_FUNCTION)) # elif !defined __GNUC__ || defined __STRICT_ANSI__ # define assert(expr) \ ((expr) \
reply other threads:[~2023-02-10 20:43 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230210204355.D09C83858414@sourceware.org \ --to=ppluzhnikov@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).