From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 969403858C78; Wed, 17 Apr 2024 20:08:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 969403858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713384498; bh=kNg0abeVTTOgGDQR9s9f+DAsFt5B5879Ewg2UXgqrBA=; h=From:To:Subject:Date:From; b=gvvh3RnxdBciZFyjs/UHhtsWP7uPwIBbwv7njL4ixpYZOUeFeb4QHaRJENu6ej+Gv /8l49UkbnlaIyCC1EenRHcj157F9YqnVQYyqcJ+QnrG2iQeryHNIeCAsRZ+D5A+WMf A72kKchPgzmDokUY2NCywPs0hYe30DLfYh+7q30E= 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: ed04c874cfecd25c2c1449f39aa66390ae6ccf9d X-Git-Newrev: f72cdbda8b5d3500c59e13bf1badc3e34a8cf192 Message-Id: <20240417200818.969403858C78@sourceware.org> Date: Wed, 17 Apr 2024 20:08:18 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f72cdbda8b5d3500c59e13bf1badc3e34a8cf192 commit f72cdbda8b5d3500c59e13bf1badc3e34a8cf192 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