GNU bug report logs -
#30913
Releasing a build compatible with glibc-2.26+
Previous Next
Full log
Message #17 received at 30913 <at> debbugs.gnu.org (full text, mbox):
On 03/23/2018 01:44 PM, Paul Eggert wrote:
>>From 0d111b0de328d31dd3444ceeec977a7aaa5bb0ed Mon Sep 17 00:00:00 2001
> From: Paul Eggert<eggert <at> cs.ucla.edu>
> Date: Fri, 23 Mar 2018 11:26:15 -0700
> Subject: [PATCH] c-stack: port to recent GCC build
>
> Problem reported by The Fireplace (Bug#30913).
> * lib/c-stack.c (die): Define only if used.
> +++ b/lib/c-stack.c
> @@ -99,6 +99,10 @@ static void (* volatile segv_action) (int);
> static char const * volatile program_error_message;
> static char const * volatile stack_overflow_message;
>
> +#if ((HAVE_LIBSIGSEGV && ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC) \
> + || (HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK \
> + && HAVE_STACK_OVERFLOW_HANDLING && SIGINFO_WORKS))
> +
That's a maintenance nightmare to keep the #if conditions in sync.
Would it not be simpler to just use __attribute__((unused)) on the
function declaration, to tell the compiler that the function does not
get used in all setups, but that it should not warn in those cases?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
This bug report was last modified 7 years and 79 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.