From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id B898A3858297; Thu, 21 Dec 2023 18:54:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B898A3858297 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703184891; bh=x9MOEHgRYvYRkKl02vBejp7Ab8B6LXV9ARZ5rc6hudc=; h=From:To:Subject:Date:From; b=jVKOxrBvpQocV0EuCGXd7xEH/O/IBS6aven3B7JA3ePTD5BvQ/xsIDXHkzeJI2Flk auzSmjYs3ehj5tNnA2cbQc5jYTikCZLHzoNzzY9zJcZkLJUStk/eVa721+em7Lgagl uRYHpKFCOH9RDo/L5YB7r2TSGF5tKh8PLGpLsZnA= 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: 5c1a0ad5adb75c0b6c24afdc2a9ce715db20bb4a X-Git-Newrev: 88bc60cf2c72ca51b1a11a487a94b24dd086e1e8 Message-Id: <20231221185451.B898A3858297@sourceware.org> Date: Thu, 21 Dec 2023 18:54:51 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=88bc60cf2c72ca51b1a11a487a94b24dd086e1e8 commit 88bc60cf2c72ca51b1a11a487a94b24dd086e1e8 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