Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wincompatible-pointer-types configure check may fail unconditionally with future compilers #149

Open
fweimer-rh opened this issue Nov 30, 2023 · 0 comments

Comments

@fweimer-rh
Copy link

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.

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

No branches or pull requests

1 participant