From: Tom de Vries Date: Thu, 5 Jun 2025 05:37:09 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.base/bp-permanent.exp with gcc 15 X-Git-Tag: binutils-2_45~403 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83433790d8e6b790343a482eaa7a579cd2688f2a;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix gdb.base/bp-permanent.exp with gcc 15 With test-case gdb.base/bp-permanent.exp and gcc 15 I run into: ... gdb compile failed, bp-permanent.c: In function 'test_signal_nested': bp-permanent.c:118:20: error: passing argument 2 of 'signal' from \ incompatible pointer type [-Wincompatible-pointer-types] 118 | signal (SIGALRM, test_signal_nested_handler); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | | | void (*)(void) In file included from bp-permanent.c:20: /usr/include/signal.h:88:57: note: expected '__sighandler_t' \ {aka 'void (*)(int)'} but argument is of type 'void (*)(void)' ... Fix this by adding an int parameter to test_signal_nested_handler. Tested on x86_64-linux. PR testsuite/32756 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32756 --- diff --git a/gdb/testsuite/gdb.base/bp-permanent.c b/gdb/testsuite/gdb.base/bp-permanent.c index d586accaa49..72e5e8a0beb 100644 --- a/gdb/testsuite/gdb.base/bp-permanent.c +++ b/gdb/testsuite/gdb.base/bp-permanent.c @@ -101,7 +101,7 @@ test_signal_no_handler (void) } static void -test_signal_nested_handler () +test_signal_nested_handler (int sig) { test (); }