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


Message #8 received at 66002 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Gleb Fotengauer-Malinovskiy <glebfm <at> altlinux.org>, 66002 <at> debbugs.gnu.org
Subject: Re: bug#66002: [PATCH] build: suppress suggest-attribute=cold warnings
Date: Fri, 15 Sep 2023 17:04:05 -0700
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 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.




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.