You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GCC 14 plans to make -Wincompatible-pointer-types an error by default for >= C99. GCC may still roll back this specific change (while retaining the other modern C changes) for GCC 14 and reinstate that one change again later depending on how we get on with the porting work. My hope is that we won't need to do that, but I mention it for full disclosure.
Clang has a subset warning, -Wincompatible-function-pointer-types, which was made fatal in Clang 16. GCC hasn't implemented this subset warning, but after discussion (some at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109835, some off-bug), decided this probably wasn't worth it, and to go wholehog with -Wincompatible-pointer-types as an error instead.
fweimer and I have already been doing the various autoconf configure comparisons and so on. so far, the damage isn't really bad at all for the configure check side, although the blast radius in general for C is still fairly big (but manageable) for the warning overall.
I think it makes sense for Clang to make -Wincompatible-pointer-types an error as well, given that it's very often an indicator of wrong code. So far, many of the examples I've seen were either always outright broken, or at least broken on 32-bit. I also think it makes sense to have a united front for the overall Modern C effort and to have consistent behaviour for GCC and Clang here.
GCC 14 plans to make
-Wincompatible-pointer-types
an error by default for >= C99. GCC may still roll back this specific change (while retaining the other modern C changes) for GCC 14 and reinstate that one change again later depending on how we get on with the porting work. My hope is that we won't need to do that, but I mention it for full disclosure.Clang has a subset warning,
-Wincompatible-function-pointer-types
, which was made fatal in Clang 16. GCC hasn't implemented this subset warning, but after discussion (some at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109835, some off-bug), decided this probably wasn't worth it, and to go wholehog with-Wincompatible-pointer-types
as an error instead.fweimer and I have already been doing the various autoconf configure comparisons and so on. so far, the damage isn't really bad at all for the configure check side, although the blast radius in general for C is still fairly big (but manageable) for the warning overall.
I think it makes sense for Clang to make
-Wincompatible-pointer-types
an error as well, given that it's very often an indicator of wrong code. So far, many of the examples I've seen were either always outright broken, or at least broken on 32-bit. I also think it makes sense to have a united front for the overall Modern C effort and to have consistent behaviour for GCC and Clang here.cc @AaronBallman
The text was updated successfully, but these errors were encountered: