GNU bug report logs - #15463
FTBFS c-stack under gcc 4.8 with --enable-gcc-warnings

Previous Next

Package: diffutils;

Reported by: Eric Blake <eblake <at> redhat.com>

Date: Wed, 25 Sep 2013 18:02:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


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

From: Eric Blake <eblake <at> redhat.com>
To: bug-diffutils <at> gnu.org, Bug-gnulib <bug-gnulib <at> gnu.org>
Subject: FTBFS c-stack under gcc 4.8 with --enable-gcc-warnings
Date: Wed, 25 Sep 2013 12:01:01 -0600
[Message part 1 (text/plain, inline)]
I tried to build diffutils from git on my Fedora 19 machine:

$ gcc --version |head -n1
gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1)

It's dying inside of gnulib's c-stack:

  CC       c-stack.o
c-stack.c: In function 'segv_handler':
c-stack.c:163:12: error: function might be candidate for attribute
'pure' if it is known to return normally [-Werror=suggest-attribute=pure]
 static int segv_handler (void *address __attribute__ ((unused)),
            ^
cc1: all warnings being treated as errors

I don't know if this is a case of diffutils being too aggressive about
the warnings it uses on gnulib files (after all, at least coreutils
explicitly uses fewer warnings for gnulib files than for its own), or if
it is something we should be fixing in gnulib.

More interesting, the function is only pure if DEBUG was not enabled
during compilation, so if we do decide to fix it in gnulib, the fix has
to use the same condition on whether to apply the attribute.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 11 years and 239 days ago.

Previous Next


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