[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 6 09:52:17 PST 2024


https://github.com/Endilll commented:

I think this PR moves things in the right direction, but I'm not well-versed in C enough to approve.

> This should have a release note and I think this is a potentially breaking change since folks using Wextra may get this diagnostic now.

I agree that release note should be added, but I'm not sure we break people with this. We ship new versions with new on-by-default diagnostics. How is this different? Not to say that this improves GCC compatibility (more on this later).

Out of 7 warning we expect in the test, GCC 13.1 issues a warning only for `f2`, `f4`, and `f6` cases: https://godbolt.org/z/18Eqnsqba. Same goes for GCC trunk. I'm not qualified enough in C to be sure which compiler gets this right. @AaronBallman would be very welcome here. 

https://github.com/llvm/llvm-project/pull/77178


More information about the cfe-commits mailing list