From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1624) id D09C83858414; Fri, 10 Feb 2023 20:43:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D09C83858414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676061835; bh=6G14I3Jq5fWIX4XWNKojn7z96ONovdp8kSNQWPOBHKg=; h=From:To:Subject:Date:From; b=A9bX6rHBiHNaSpn1tzdV3RIFjM4Wy0TBiWY6eFnG+W9AbvRSAbXZZbcIPv3WmLh84 RHGB6uU0AlC2ZQu1SaMkJjuKN+n1DWEd4Qz7BKBCz+lbkVNgti/BhAeMZvjuGsY7JT xTeVcAOJa9gWhWdzEs/U3TgRzaTBVdLKmGtw2hVY= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Paul Pluzhnikov To: glibc-cvs@sourceware.org Subject: [glibc/google/grte/v5-2.27/master] Apply upstream commit __builtin_FILE commit to GRTEv5. X-Act-Checkin: glibc X-Git-Author: Paul Pluzhnikov X-Git-Refname: refs/heads/google/grte/v5-2.27/master X-Git-Oldrev: 16ca0733a06f551aca8a5ecd38bcb719c4a56634 X-Git-Newrev: 2dda6eab5228f99a30c8102c697592a3901e069c Message-Id: <20230210204355.D09C83858414@sourceware.org> Date: Fri, 10 Feb 2023 20:43:55 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2dda6eab5228f99a30c8102c697592a3901e069c commit 2dda6eab5228f99a30c8102c697592a3901e069c Author: Paul Pluzhnikov 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 (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) \