On Mon, 16 Jun 2025, RAGINI wrote:

ctxopt.c: In function ‘ctxopt_add_opt_settings’:
ctxopt.c:4671:21: error: assignment to ‘void (*)(void)’ from incompatible pointer type ‘void (*)(char *, char *, char *, int, char **, int, void *, int, void **)’ [-Wincompatible-pointer-types]

writing for better clarity, we can see that, 'pointer to function' conversion 
is attempted.

FROM
void (*)(char *, char *, char *, int,  char **, int,  void *, int,  void **)

TO
void (*)(void)

This pathology is seen in C code.


WORKAROUND
A workaround is to weaken the type enforcement, as seen below

export CFLAGS="-Wno-error=incompatible-pointer-types"

or for a specific command

CFLAGS="-Wno-error=incompatible-pointer-types" ./configure


TAFSEER
With the release of GCC-15, given strict type checking, a lot of 'legacy' C 
code will give compilation errors.

Documentation
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

Discussion
https://gcc.gnu.org/pipermail/gcc/2023-November/242943.html


warm regards
Saifi.

Reply via email to