bugGNU Time - Bugs: bug #66450, time-1.9 fails to build with...

 
 

bug #66450: time-1.9 fails to build with -std=gnu23 (new GCC 15 default)

Submitter:  Sam James <thesamesam>
Submitted:  Sun 17 Nov 2024 01:50:48 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 17 Nov 2024 01:50:48 AM UTC, original submission:  

With upcoming GCC 15 which defaults to -std=gnu23, time-1.9 fails to build like:
```
[...]
src/resuse.c: In function 'resuse_start':
src/resuse.c:51:1: warning: old-style function definition [-Wold-style-definition]
   51 | resuse_start (resp)
      | ^~~~~~~~~~~~
rm -f lib/libtime.a
x86_64-pc-linux-gnu-ar cr lib/libtime.a lib/lib_libtime_a-dirname-lgpl.o lib/lib_libtime_a-basename-lgpl.o lib/lib_libtime_a-stripslash.o lib/lib_libtime_a-getprogname.o lib/lib_libtime_
a-progname.o lib/lib_libtime_a-unistd.o lib/lib_libtime_a-version-etc.o lib/lib_libtime_a-version-etc-fsf.o lib/localtime-buffer.o
src/time.c: In function 'fprintargv':
src/time.c:318:1: warning: old-style function definition [-Wold-style-definition]
  318 | fprintargv (fp, argv, filler)
      | ^~~~~~~~~~
src/time.c: In function 'linear_argv':
src/time.c:344:1: warning: old-style function definition [-Wold-style-definition]
  344 | linear_argv (argv)
      | ^~~~~~~~~~~
src/time.c: In function 'summarize':
src/time.c:424:1: warning: old-style function definition [-Wold-style-definition]
  424 | summarize (fp, fmt, command, resp)
      | ^~~~~~~~~
src/time.c: In function 'getargs':
src/time.c:640:1: warning: old-style function definition [-Wold-style-definition]
  640 | getargs (argc, argv)
      | ^~~~~~~
src/time.c: In function 'run_command':
src/time.c:726:1: warning: old-style function definition [-Wold-style-definition]
  726 | run_command (cmd, resp)
      | ^~~~~~~~~~~
src/time.c:750:20: error: assignment to 'sighandler' {aka 'void ()(void)'} from incompatible pointer type '__sighandler_t' {aka 'void ()(int)'} [-Wincompatible-pointer-types]
  750 |   interrupt_signal = signal (SIGINT, SIG_IGN);
      |                    ^
src/time.c:751:15: error: assignment to 'sighandler' {aka 'void ()(void)'} from incompatible pointer type '__sighandler_t' {aka 'void ()(int)'} [-Wincompatible-pointer-types]
  751 |   quit_signal = signal (SIGQUIT, SIG_IGN);
      |               ^
src/time.c:757:19: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
  757 |   signal (SIGINT, interrupt_signal);
      |                   ^~~~~~~~~~~~~~~~
      |                   |
      |                   sighandler {aka void (*)(void)}
In file included from lib/signal.h:52,
                 from /usr/include/sys/wait.h:36,
                 from lib/sys/wait.h:28,
                 from src/time.c:27:
/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void ()(int)'} but argument is of type 'sighandler' {aka 'void ()(void)'}
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
src/time.c:758:20: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
  758 |   signal (SIGQUIT, quit_signal);
[...]
```

Sam James <thesamesam>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by thesamesam (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-9aa3.
    Corresponding source code