From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id C80433858299; Wed, 7 Feb 2024 14:08:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C80433858299 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707314885; bh=ovQSpJFoMBQLUGAv6OfG/5bzm/xeJoYULkoJ1z02Zvc=; h=From:To:Subject:Date:From; b=Uq0ukmJbj+osQj0w0ZyNS0GrgAdDf3Y8oNt92gnpwU53bvVqcU9FHzhQrRAs8/YMO 702qVoJnkDkCJdMHhd/Q0/sImvMBt9ndflxZumY2AKvaX5RrpTiw2NV9BcVm11lIAZ D9x09krkhbaMuYqJiK6rn34VQdnUtpPcqYmBQhY4= 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: 971b4ffa1fd1f0437f56dee9f1ecc5c004430163 X-Git-Newrev: 4e5afb4a4ed1051a0460b3bb77f8f2e2fbd5e8f7 Message-Id: <20240207140805.C80433858299@sourceware.org> Date: Wed, 7 Feb 2024 14:08:05 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4e5afb4a4ed1051a0460b3bb77f8f2e2fbd5e8f7 commit 4e5afb4a4ed1051a0460b3bb77f8f2e2fbd5e8f7 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