aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-08-06 11:30:48 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2025-08-06 11:30:48 +0200
commita107b01da42b2f2303ffe53df5ea4a796f40597d (patch)
treeb6afe8d3d1d95427ed8f9fc83bbb152977216d17
parent70aff5112ec25f2391d8048d8c7994160d3cb008 (diff)
downloadgcc-a107b01da42b2f2303ffe53df5ea4a796f40597d.zip
gcc-a107b01da42b2f2303ffe53df5ea4a796f40597d.tar.gz
gcc-a107b01da42b2f2303ffe53df5ea4a796f40597d.tar.bz2
libgcc: Remove useless forward declaration [PR121397]
aarch64 for some strange reason unconditionally enables -Werror for libgcc building and this particular file for some strange reason contains a useless static forward declaration of a function only defined in the #if defined __sun__ && defined __svr4__ block and not otherwise (with __attribute__((constructor))). And we warn (with -Werror error) in the non-__sun__/__svr4__ case because it declares a static function that is never defined. The forward declaration makes no sense to me, for static functions forward declarations shouldn't be needed even for -Wstrict-prototypes, and AFAIK we don't warn on static __attribute__((constructor)) void foo (void) {} being unused. And the function isn't used before being defined. So, the following patch just removes the forward declaration. 2025-08-06 Jakub Jelinek <jakub@redhat.com> PR libgcc/121397 * enable-execute-stack-mprotect.c (check_enabling): Remove useless forward declaration.
-rw-r--r--libgcc/enable-execute-stack-mprotect.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libgcc/enable-execute-stack-mprotect.c b/libgcc/enable-execute-stack-mprotect.c
index 08a0d72..7971efb 100644
--- a/libgcc/enable-execute-stack-mprotect.c
+++ b/libgcc/enable-execute-stack-mprotect.c
@@ -30,7 +30,6 @@
static int need_enable_exec_stack;
-static void check_enabling (void) __attribute__ ((unused));
extern void __enable_execute_stack (void *);
#if defined __sun__ && defined __svr4__