From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 044A53858294; Mon, 29 Jan 2024 17:58:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 044A53858294 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706551099; bh=To8hIGwngY6e43m9PqOxHci2toaUyT6bnTKnEQ/kSKI=; h=From:To:Subject:Date:From; b=a6poutB9a1D2GI4hjt9rVXN6BUzY1meGzA2hEzW9m2EAvUnAV3X2vjUei+y6AsEL2 k3Bi9LUOC3aM+LBsRZDoxQmI7e2xXwXYdJ/CS082vuHQ+DAMoFAWxxaKMtUsej8pD1 Z/0wuUWK7e7XxOW0g58X2RYnumhTWXRF9Phcw28g= 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: b9bf5cf3963fd6af14516246542f62135c5b7935 X-Git-Newrev: f992095bfc4e5cbee031691be175e931f5f75a27 Message-Id: <20240129175819.044A53858294@sourceware.org> Date: Mon, 29 Jan 2024 17:58:18 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f992095bfc4e5cbee031691be175e931f5f75a27 commit f992095bfc4e5cbee031691be175e931f5f75a27 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 a0378c500e..a89bacff56 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