https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98097
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- For optimizations indeed we shouldn't do any such assumptions, the fact that the function is called with a particular pointer type doesn't necessarily mean that is the dynamic type of the underlying object, and strcmp etc. functions read or write the memory through char type which can alias anything. But for warnings, we can indeed use the passed in type as a reasonable hint what is ok and what is suspicious.