Skip to content

Conversation

@teleshoes
Copy link

@teleshoes teleshoes commented Dec 8, 2025

usb_ir compiles fine under gcc-14, but newly fails under gcc-15. this pull request compiles fine in gcc-14 and gcc-15.

debian gnu/linux 6.16.12+deb14+1-amd64
cmake version 3.31.6
gcc (Debian 15.2.0-7) 15.2.0

new compilation error in gcc-15 (not present in gcc-14)
iguanair/software/usb_ir/daemon.c:58:9:
error: too many arguments to function ‘initServer’; expected 0, have 1
new compilation error in gcc-15 (not present in gcc-14)
iguanair/software/usb_ir/server.c:350:7:
error: conflicting types for ‘aliasSummary’; have ‘char *(iguanaDev *)’
@teleshoes teleshoes changed the title fix compilation errors fix compilation errors in gcc-15 Dec 8, 2025
@teleshoes teleshoes changed the title fix compilation errors in gcc-15 fix compilation errors in gcc-15 C23 Dec 8, 2025
@teleshoes
Copy link
Author

oh the breaking change is that gcc-15 finally switched default C17 => C23

this PR compiles fine in C11, C18 and C23, the previous code compiles only in C11 and C18

~/Code/iguanair/software/usb_ir$
~/Code/iguanair/software/usb_ir$ /usr/bin/cc  -I. -Wall -fpic -fvisibility=hidden -Wno-long-long -pedantic -g -O2 -MD -MT CMakeFiles/igdaemon.dir/daemon.c.o -MF CMakeFiles/igdaemon.dir/daemon.c.o.d -o CMakeFiles/igdaemon.dir/daemon.c.o -c daemon.c \
-std=gnu23
iguanair/software/usb_ir/daemon.c: In function ‘workLoop’:
iguanair/software/usb_ir/daemon.c:58:9: error: too many arguments to function ‘initServer’; expected 0, have 1
   58 |     if (initServer(&srvSettings))
      |         ^~~~~~~~~~ ~~~~~~~~~~~~
In file included from iguanair/software/usb_ir/daemon.c:33:
iguanair/software/usb_ir/server.h:99:6: note: declared here
   99 | bool initServer();
      |      ^~~~~~~~~~
~/Code/iguanair/software/usb_ir$
~/Code/iguanair/software/usb_ir$ /usr/bin/cc  -I. -Wall -fpic -fvisibility=hidden -Wno-long-long -pedantic -g -O2 -MD -MT CMakeFiles/igdaemon.dir/daemon.c.o -MF CMakeFiles/igdaemon.dir/daemon.c.o.d -o CMakeFiles/igdaemon.dir/daemon.c.o -c daemon.c \
-std=gnu18
~/Code/iguanair/software/usb_ir$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant