[Bug c/25702] feature request: generate a warning for sizeof on a pointer

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat May 21 17:01:00 GMT 2016


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

--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
PR 71219 requests a new warning for:

  struct S* p = (struct S*)malloc(sizeof(p));

which would solve some of the other bugs shown in comment 3.


More information about the Gcc-bugs mailing list