From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 15 11:27:02 2023 Received: (at submit) by debbugs.gnu.org; 15 Sep 2023 15:27:02 +0000 Received: from localhost ([127.0.0.1]:44466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhAih-0003Wu-4a for submit@debbugs.gnu.org; Fri, 15 Sep 2023 11:27:02 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qh99z-0000LC-Ka for submit@debbugs.gnu.org; Fri, 15 Sep 2023 09:47:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qh99d-0003rP-UI for bug-grep@gnu.org; Fri, 15 Sep 2023 09:46:45 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qh99Y-00028O-4x for bug-grep@gnu.org; Fri, 15 Sep 2023 09:46:40 -0400 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 9066272C8D3 for ; Fri, 15 Sep 2023 16:46:33 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by imap.altlinux.org (Postfix) with ESMTP id 6D70136D00B7; Fri, 15 Sep 2023 16:46:33 +0300 (MSK) From: Gleb Fotengauer-Malinovskiy To: bug-grep@gnu.org Subject: [PATCH] build: suppress suggest-attribute=cold warnings Date: Fri, 15 Sep 2023 13:45:00 +0000 Message-Id: <20230915134500.1718945-1-glebfm@altlinux.org> X-Mailer: git-send-email 2.33.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=194.107.17.57; envelope-from=glebfm@altlinux.org; helo=vmicros1.altlinux.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 15 Sep 2023 11:26:57 -0400 Cc: Gleb Fotengauer-Malinovskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Following the glibc commit glibc-2.38~298 ("Mark various cold functions as __COLD"), GNU grep build with -flto flag triggers a GCC warning: sigsegv.c: In function ‘stackoverflow_deinstall_handler.part.0’: sigsegv.c:1441:1: error: function might be candidate for attribute ‘cold’ [-Werror=suggest-attribute=cold] * configure.ac (GNULIB_WARN_CFLAGS): Suppress -Wsuggest-attribute=cold. Tiny-change: yes --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 844a259bd..b793cabde 100644 --- a/configure.ac +++ b/configure.ac @@ -159,6 +159,11 @@ if test $gl_gcc_warnings != no; then # Remove the following and save the result in GNULIB_WARN_CFLAGS. nw= nw="$nw -Wunused-macros" + + # To prevent warnings in sigsegv.c if the perror function + # has "cold" attribute. + nw="$nw -Wsuggest-attribute=cold" + gl_WARN_ADD([-Wno-format-nonliteral]) gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw]) AC_SUBST([GNULIB_WARN_CFLAGS]) -- glebfm From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 15 20:04:25 2023 Received: (at 66002) by debbugs.gnu.org; 16 Sep 2023 00:04:25 +0000 Received: from localhost ([127.0.0.1]:45081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhInQ-0006nl-Kz for submit@debbugs.gnu.org; Fri, 15 Sep 2023 20:04:24 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:52218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhInL-0006nR-KE for 66002@debbugs.gnu.org; Fri, 15 Sep 2023 20:04:23 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 7A8353C00F586; Fri, 15 Sep 2023 17:04:06 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id cJyZuQ0c6u0u; Fri, 15 Sep 2023 17:04:05 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id A26ED3C00D18F; Fri, 15 Sep 2023 17:04:05 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu A26ED3C00D18F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1694822645; bh=W5TsS1o5YTqaZ/i3F3OBEyGZ/5gCpTsztvlaYTVHrgM=; h=Message-ID:Date:MIME-Version:To:From; b=TlgW9xhu7v2R0UXekRCns1bV6VmoXtNTEhUUrX8oYThgMLbjPM1l7okPB5v01PDyN W2sl5kJXjVr7BR9GlTnzSVVFyXhGx1fbEZnNSu8iYxAkOG0iH1K5LpoIDyNziDUSSu tjZl9rnBqBs2iO3Zx2d1jvuwH5xb5vbEJR+Ux/XAJWIhjg3B5IjuN8d8zZumRgPKg0 wcbShRN+qy6nohcwbzVFZLf/DH8lM5qtLlxO+MAdx8eg8uCysfOtRCU2kpidrkRHmt cLqpWhO4vq9YNzcb4ayhVLLu+sjc6MV0s7Z5YlR4iLZdfhMSXEfw+4opzKy4xIv/sQ LThsAWUJXP+9A== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LV6v2wdYJ4Rd; Fri, 15 Sep 2023 17:04:05 -0700 (PDT) Received: from [131.179.23.235] (wifi-131-179-23-235.host.ucla.edu [131.179.23.235]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 8AA5C3C00F586; Fri, 15 Sep 2023 17:04:05 -0700 (PDT) Message-ID: <0d8eed7c-fd35-66c2-986c-62569e7160a9@cs.ucla.edu> Date: Fri, 15 Sep 2023 17:04:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: bug#66002: [PATCH] build: suppress suggest-attribute=cold warnings To: Gleb Fotengauer-Malinovskiy , 66002@debbugs.gnu.org References: <20230915134500.1718945-1-glebfm@altlinux.org> Content-Language: en-US From: Paul Eggert In-Reply-To: <20230915134500.1718945-1-glebfm@altlinux.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 66002 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.5 (--) On 9/15/23 08:45, Gleb Fotengauer-Malinovskiy wrote: > Following the glibc commit glibc-2.38~298 ("Mark various cold functions > as __COLD"), GNU grep build with -flto flag triggers a GCC warning: >=20 > sigsegv.c: In function =E2=80=98stackoverflow_deinstall_handler.part.0=E2= =80=99: > sigsegv.c:1441:1: error: function might be candidate for attribute =E2=80= =98cold=E2=80=99 [-Werror=3Dsuggest-attribute=3Dcold] >=20 > * configure.ac (GNULIB_WARN_CFLAGS): Suppress -Wsuggest-attribute=3Dcol= d. I'm not seeing this problem on Fedora 38 when I manually mark error,=20 error_at_line, and perror with _GL_ATTRIBUTE_COLD. I am compiling with=20 gcc (GCC) 13.2.1 20230728 (Red Hat 13.2.1-1) and configuring with=20 "./configure --enable-gcc-warnings 'CC=3Dgcc -flto'". This is grep commit= =20 102be2bfa571355ff44db39348438a0def1ab382. If you're using an older GCC, I wouldn't worry about the false alarm,=20 whatever it's about (it's not clear from the diagnostic). The=20 attribute-cold diagnostics are occasionally helpful for minor=20 performance tuning, and are harmless if ignored. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 16 19:05:02 2023 Received: (at 66002) by debbugs.gnu.org; 16 Sep 2023 23:05:02 +0000 Received: from localhost ([127.0.0.1]:48725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qheLS-0008If-9g for submit@debbugs.gnu.org; Sat, 16 Sep 2023 19:05:01 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]:59974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhcqz-0002xi-Gc for 66002@debbugs.gnu.org; Sat, 16 Sep 2023 17:29:26 -0400 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 8C4C472C8D3; Sun, 17 Sep 2023 00:29:11 +0300 (MSK) Received: from glebfm.altlinux.org (flight.tilaa.cloud [84.22.108.118]) by imap.altlinux.org (Postfix) with ESMTPSA id 5FD2A36D00B7; Sun, 17 Sep 2023 00:29:11 +0300 (MSK) Date: Sun, 17 Sep 2023 01:28:53 +0400 From: Gleb Fotengauer-Malinovskiy To: Paul Eggert Subject: Re: bug#66002: [PATCH] build: suppress suggest-attribute=cold warnings Message-ID: References: <20230915134500.1718945-1-glebfm@altlinux.org> <0d8eed7c-fd35-66c2-986c-62569e7160a9@cs.ucla.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0d8eed7c-fd35-66c2-986c-62569e7160a9@cs.ucla.edu> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66002 X-Mailman-Approved-At: Sat, 16 Sep 2023 19:04:57 -0400 Cc: 66002@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Fri, Sep 15, 2023 at 05:04:05PM -0700, Paul Eggert wrote: > On 9/15/23 08:45, Gleb Fotengauer-Malinovskiy wrote: > > Following the glibc commit glibc-2.38~298 ("Mark various cold functions > > as __COLD"), GNU grep build with -flto flag triggers a GCC warning: > > > > sigsegv.c: In function ‘stackoverflow_deinstall_handler.part.0’: > > sigsegv.c:1441:1: error: function might be candidate for attribute ‘cold’ [-Werror=suggest-attribute=cold] > > > > * configure.ac (GNULIB_WARN_CFLAGS): Suppress -Wsuggest-attribute=cold. > > I'm not seeing this problem on Fedora 38 when I manually mark error, > error_at_line, and perror with _GL_ATTRIBUTE_COLD. I am compiling with > gcc (GCC) 13.2.1 20230728 (Red Hat 13.2.1-1) and configuring with > "./configure --enable-gcc-warnings 'CC=gcc -flto'". This is grep commit > 102be2bfa571355ff44db39348438a0def1ab382. > > If you're using an older GCC, I've encountered this warning with a version of GCC that's very similar: gcc-13 (GCC) 13.2.1 20230817 (ALT Sisyphus 13.2.1-alt2) I'm not certain what's different in our testing, but I managed to reproduce it on Fedora 38. This occurred both when I made a simple edit to the /usr/include/stdio.h header: -extern void perror (const char *__s); +extern void perror (const char *__s) __attribute__ ((__cold__)); and with glibc version 2.38.9000-8.fc40.x86_64 from Rawhide. > I wouldn't worry about the false alarm, > whatever it's about (it's not clear from the diagnostic). The > attribute-cold diagnostics are occasionally helpful for minor > performance tuning, and are harmless if ignored. I'm not insisting that this needs to be addressed, but I do believe that someone else might encounter this issue. -- glebfm From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 13 19:25:32 2024 Received: (at 66002-done) by debbugs.gnu.org; 14 Dec 2024 00:25:32 +0000 Received: from localhost ([127.0.0.1]:44782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMFyO-0005u5-Ew for submit@debbugs.gnu.org; Fri, 13 Dec 2024 19:25:32 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:51918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMFyN-0005pQ-32 for 66002-done@debbugs.gnu.org; Fri, 13 Dec 2024 19:25:31 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id C8DD93C082EAE; Fri, 13 Dec 2024 16:25:25 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id sOMlWqwB5sPx; Fri, 13 Dec 2024 16:25:25 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 8ED2D3C082EB1; Fri, 13 Dec 2024 16:25:25 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 8ED2D3C082EB1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1734135925; bh=QbpHvI2UhgUAtuiwqxg8varNoA1rLdAjzRUuRdvota8=; h=Message-ID:Date:MIME-Version:To:From; b=Q0a9LjsygDsFGUFdw8gn03+ztOJQ/BwVWNqnRf3RT17XSWNqgAQWTAk1oOlKCNiJa vglMvyWcHxDZJmBclEXNUtfg1L9Xguml5yKSGyi+uQxhc54qBryjHTnmgNgeZTwnUF 6fenBUivQIE6IPe1XaZ8y6URKASySJ8CSR7t+OcN99bkn378vRuE7hvDhAoOF/rqRJ 4ohwM1zvzZ0AXeRmFqj9NOmssQiveLjKImZjlwAHdd6d4Vn0NOI+VGV6HUhGXNyvcA bXLAm7E11l8zGCdOT5RV/kht4OoZC+tOEF5jS1uJmvVY70qkN2OUZwOTJwQ3UZGhcp 0xWBJDIUE5l3A== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id Ivn41dVFvCwY; Fri, 13 Dec 2024 16:25:25 -0800 (PST) Received: from [10.10.33.175] (unknown [96.69.135.29]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 4F1103C082EAE; Fri, 13 Dec 2024 16:25:25 -0800 (PST) Message-ID: <68001c64-644e-4c82-8b52-359cf57e3e60@cs.ucla.edu> Date: Fri, 13 Dec 2024 17:25:24 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#66002: [PATCH] build: suppress suggest-attribute=cold warnings To: Gleb Fotengauer-Malinovskiy References: <20230915134500.1718945-1-glebfm@altlinux.org> <0d8eed7c-fd35-66c2-986c-62569e7160a9@cs.ucla.edu> Content-Language: en-US From: Paul Eggert In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66002-done Cc: 66002-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 9/16/23 15:28, Gleb Fotengauer-Malinovskiy wrote: > I'm not insisting that this needs to be addressed, but I do believe that > someone else might encounter this issue. If it becomes a problem I suppose we could disable --suggest-attribute=cold, as it's not that useful for coreutils. In the meantime I'm closing this old bug report. From unknown Mon Jun 23 23:55:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 11 Jan 2025 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator