-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Hi, Team,
I tried to compile wiringpi-3.16 with GCC 15 and encountered the below error.
[Compile] wiringPiSPI.c
wiringPi.c: In function 'wiringPiGlobalMemoryAccess':
wiringPi.c:3363:5: error: too many arguments to function 'GetRP1Memory'; expected 0, have 2
3363 | GetRP1Memory(pciemem_RP1, sizeof(pciemem_RP1));
| ^~~~~~~~~~~~ ~~~~~~~~~~~
wiringPi.c:3329:6: note: declared here
3329 | void GetRP1Memory() {
| ^~~~~~~~~~~~But the compilation works if using GCC 14.
I find that the issue might comes from some behavior change on function signature specifies no argument.
- Compiling with GCC 15 gives error too many arguments to function verilogaparse Qucs/ADMS#115 (comment)
- https://stackoverflow.com/questions/24700552/gcc-behaviour-when-calling-a-function-with-too-many-arguments/24700585#24700585
It seems that either improve the function to explicitly specify function signatures for wiringPiGlobalMemoryAccess() (and an additional function call change),
or compiling with -std=gnu17 in CFLAGS option in the makefile.
Can WiringPi team help improve the code and release a new version to make the compilation work for newer GCC?
(I prefer to download from tagged / released pages rather than building from the master branch 😅)
Best Regards.
Metadata
Metadata
Assignees
Labels
No labels