Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdb: fix build with gcc-15 and -std=c23
@ 2024-12-16 12:48 Rudi Heitbaum
  2024-12-16 13:15 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Rudi Heitbaum @ 2024-12-16 12:48 UTC (permalink / raw)
  To: gdb-patches; +Cc: rudi

int signum is required to be passed to SigHandler.
readline-8.2 has updated this typedef in the upstream 8.2

fixes:
    ../../../readline/readline/signals.c: In function 'rl_set_signals':
    ../../../readline/readline/signals.c:480:40: error: passing argument 2 of 'rl_maybe_set_sighandler' from incompatible pointer type [-Wincompatible-pointer-types]
      480 |       rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int);
          |                                        ^~~~~~~~~~~~~~~~~
          |                                        |
          |                                        void (*)(int)
    ../../../readline/readline/signals.c:407:47: note: expected 'void (*)(void)' but argument is of type 'void (*)(int)'
      407 | rl_maybe_set_sighandler (int sig, SigHandler *handler, sighandler_cxt *ohandler)
          |                                   ~~~~~~~~~~~~^~~~~~~

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
 readline/readline/signals.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/readline/readline/signals.c b/readline/readline/signals.c
index 8fedc370a1a..28f5366030c 100644
--- a/readline/readline/signals.c
+++ b/readline/readline/signals.c
@@ -64,7 +64,7 @@
 
 /* This typedef is equivalent to the one for Function; it allows us
    to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */
-typedef RETSIGTYPE SigHandler ();
+typedef RETSIGTYPE SigHandler (int);
 
 #if defined (HAVE_POSIX_SIGNALS)
 typedef struct sigaction sighandler_cxt;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb: fix build with gcc-15 and -std=c23
  2024-12-16 12:48 [PATCH] gdb: fix build with gcc-15 and -std=c23 Rudi Heitbaum
@ 2024-12-16 13:15 ` Andreas Schwab
  2024-12-17 10:25   ` Rudi Heitbaum
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2024-12-16 13:15 UTC (permalink / raw)
  To: Rudi Heitbaum; +Cc: gdb-patches

https://sourceware.org/bugzilla/show_bug.cgi?id=32265

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb: fix build with gcc-15 and -std=c23
  2024-12-16 13:15 ` Andreas Schwab
@ 2024-12-17 10:25   ` Rudi Heitbaum
  0 siblings, 0 replies; 3+ messages in thread
From: Rudi Heitbaum @ 2024-12-17 10:25 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

Thanks Andreas,

I have tested
https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-16.0.50.20241217.tar.xz
with the readline-8.2 and works well.

Thanks All

On Tue, 17 Dec 2024 at 00:15, Andreas Schwab <schwab@suse.de> wrote:

> https://sourceware.org/bugzilla/show_bug.cgi?id=32265
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
>

[-- Attachment #2: Type: text/html, Size: 1135 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-17 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-16 12:48 [PATCH] gdb: fix build with gcc-15 and -std=c23 Rudi Heitbaum
2024-12-16 13:15 ` Andreas Schwab
2024-12-17 10:25   ` Rudi Heitbaum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox