-Wincompatible-pointer-types configure check may fail unconditionally with future compilers
fweimer-rh opened this issue · comments
It is possible that GCC 14 could enable an error by default for incompatible-pointer-types (which is a C constraint violation and probably shouldn't result in an executable). This causes a configure check to fail even though the warning option is supported:
configure:13044: checking whether 'gcc' supports -Wincompatible-pointer-types
configure:13059: gcc -c -pipe -Wincompatible-pointer-types -D_DEFAULT_SOURCE -D
_ISOC99_SOURCE -DLINUX_XXX conftest.c >&5
conftest.c: In function 'main':
conftest.c:29:33: error: assignment to 'struct foo *' from incompatible pointer type 'struct bar *'
29 | struct foo *f; struct bar *b; f = b;
| ^
configure:13059: $? = 1
configure: failed program was:
| /* confdefs.h */
[…]
| int
| main (void)
| {
| struct foo *f; struct bar *b; f = b;
| ;
| return 0;
| }
configure:13071: result: no
This should be harmless because the warning/error is enabled by default anyway.