GNU bug report logs - #66002
[PATCH] build: suppress suggest-attribute=cold warnings

Previous Next

Package: grep;

Reported by: Gleb Fotengauer-Malinovskiy <glebfm <at> altlinux.org>

Date: Fri, 15 Sep 2023 15:28:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#66002: closed ([PATCH] build: suppress suggest-attribute=cold
 warnings)
Date: Sat, 14 Dec 2024 00:26:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 13 Dec 2024 17:25:24 -0700
with message-id <68001c64-644e-4c82-8b52-359cf57e3e60 <at> cs.ucla.edu>
and subject line Re: bug#66002: [PATCH] build: suppress suggest-attribute=cold warnings
has caused the debbugs.gnu.org bug report #66002,
regarding [PATCH] build: suppress suggest-attribute=cold warnings
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
66002: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66002
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Gleb Fotengauer-Malinovskiy <glebfm <at> altlinux.org>
To: bug-grep <at> gnu.org
Cc: Gleb Fotengauer-Malinovskiy <glebfm <at> altlinux.org>
Subject: [PATCH] build: suppress suggest-attribute=cold warnings
Date: Fri, 15 Sep 2023 13:45:00 +0000
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



[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Gleb Fotengauer-Malinovskiy <glebfm <at> altlinux.org>
Cc: 66002-done <at> debbugs.gnu.org
Subject: Re: bug#66002: [PATCH] build: suppress suggest-attribute=cold warnings
Date: Fri, 13 Dec 2024 17:25:24 -0700
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.


This bug report was last modified 163 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.