https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95485

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Ah, yes, -Wpedantic does detect the invalid conversion.  But few projects use
-Wpedantic (GCC itself doesn't) and enabling the warning in -Wall or -Wextra
would likely lead to lots of noise for code that converts between object and
function pointers (POSIX requires it to work).

A warning implemented in a front end can also only detect questionable
conversions but not the actual writes, which is what the warning I'm working on
does (i.e., detect stores into read-only storage).

Reply via email to