[PATCH] D134831: [Clang][Sema] Add -Wcast-function-type-strict
Bob Haarman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 21 09:45:20 PST 2023
inglorion added a comment.
Thanks for the reply!
FWIW, this warning is triggered by code which uses glib, which contains a number of function(some_type*) to function(void*) casts, for example here: https://github.com/GNOME/glib/blob/339aaa3719757614af61f427b66a46893e6dc760/glib/glib-autocleanups.h#L47, which expands to function pointer casts here: https://github.com/GNOME/glib/blob/339aaa3719757614af61f427b66a46893e6dc760/glib/gmacros.h#L1360
I imagine glib is reasonably commonly used, so this might cause some build failures (we're seeing some in ChromiumOS). Not sure if that's enough to affect the choice of having this on or off by default when -Wcast-function-type is in effect, but I thought I would provide the data point.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134831/new/
https://reviews.llvm.org/D134831
More information about the cfe-commits
mailing list