From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 6BBF1388212D; Thu, 28 Sep 2023 17:53:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BBF1388212D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695923584; bh=95OBDs2ET41RqWzTVylSNqcCeGJka7nZywWBPoqfhKg=; h=From:To:Subject:Date:From; b=X4vurGgnXKCMpy3phv4HCrKn3sV3chNPxbdnItF/1qHgEM0cHucZoSJMDWj5+RQ23 XP1wg4KXv1a7DZSwQQp6dy49z4pGpbyrxlgtFVBuWDIlpf2TCysV9qbsn5cenW7u11 uO3inwX0cYNIlyurS0p8lqEAG6ih22xA7il2gZEs= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] string: Suppress clang confstr -Wignored-attributes on strlen X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 6393bc2b733d544d3ec6c2ce00a544e8549f2a09 X-Git-Newrev: 54f65559b0353701da52c12bfaf69a037175fb81 Message-Id: <20230928175304.6BBF1388212D@sourceware.org> Date: Thu, 28 Sep 2023 17:53:04 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=54f65559b0353701da52c12bfaf69a037175fb81 commit 54f65559b0353701da52c12bfaf69a037175fb81 Author: Adhemerval Zanella Date: Thu Sep 28 14:18:54 2023 -0300 string: Suppress clang confstr -Wignored-attributes on strlen clang warns that the alias will be always resolve to __strlen even if weak definition of __GI_strlen is overridden, which is really the intention. Diff: --- string/strlen.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/string/strlen.c b/string/strlen.c index 5a4424f9a5..b648ee2aa3 100644 --- a/string/strlen.c +++ b/string/strlen.c @@ -48,5 +48,10 @@ __strlen (const char *str) } #ifndef STRLEN weak_alias (__strlen, strlen) +/* clang warns that the alias will be always resolve to __strlen even if weak + definition of __GI_strlen is overridden, which is really the intention. */ +DIAG_PUSH_NEEDS_COMMENT_CLANG; +DIAG_IGNORE_NEEDS_COMMENT_CLANG (16, "-Wignored-attributes"); libc_hidden_builtin_def (strlen) +DIAG_POP_NEEDS_COMMENT_CLANG; #endif