From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 0684D385841D; Tue, 2 Apr 2024 15:54:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0684D385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712073268; bh=ecqM7l6buuaY3GdO4jSqn7VK63plUGglFApLLl4p/mY=; h=From:To:Subject:Date:From; b=IA0Eb5FhCfj1KyD4oO2cMsqhInyaQBxItR/ZHXnUhgmg5cxFRnso3UV31pqAkN2yK 1Q7SslH5EWw3KfysKBjxuoqtB3GdlYxPBbtfEuB3Z2sS8+Y6dG1niQaGumU/R07Eg5 9o0qlYBu3qIDeCHVQXKaOG8cRwB8q3igJThBwMXc= 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: 1e1a1067e5df565257b03edd4d7763616d7fd659 X-Git-Newrev: a900809d5997eb9e807db3800b1891580815a8c6 Message-Id: <20240402155428.0684D385841D@sourceware.org> Date: Tue, 2 Apr 2024 15:54:28 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a900809d5997eb9e807db3800b1891580815a8c6 commit a900809d5997eb9e807db3800b1891580815a8c6 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