Skip to content

Build failure with GCC 15 (defaults to -std=gnu23) #48

@thesamesam

Description

@thesamesam

Upcoming GCC 15 defaults to -std=gnu23. gpm fails to build as follows:

lib/libcurses.c:46:5: error: conflicting types for ‘Gpm_Wgetch’; have ‘int(WINDOW *)’ {aka ‘int(struct _win_st *)’}
   46 | int Gpm_Wgetch(WINDOW *win)
      |     ^~~~~~~~~~
In file included from /var/tmp/portage/sys-libs/gpm-1.20.7-r6/work/gpm-1.20.7-abi_x86_32.x86/src/headers/gpmInt.h:28,
                 from lib/libcurses.c:30:
/var/tmp/portage/sys-libs/gpm-1.20.7-r6/work/gpm-1.20.7-abi_x86_32.x86/src/headers/gpm.h:271:12: note: previous declaration of ‘Gpm_Wgetch’ with type ‘int(void)’
  271 | extern int Gpm_Wgetch();
      |            ^~~~~~~~~~

C23 removes unprototyped functions.

It should be possible to reproduce these with older GCC (and Clang) with
-std=gnu23 or -std=c23 set manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions