This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25702] feature request: generate a warning for sizeof on a pointer
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 21 May 2016 17:09:59 +0000
- Subject: [Bug c/25702] feature request: generate a warning for sizeof on a pointer
- Auto-submitted: auto-generated
- References: <bug-25702-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25702
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If we add such a warning, IMNSHO it shouldn't be in -Wall, because sizeof on
pointer is a perfectly valid thing, which is used in huge amounts of code,
there is really nothing wrong on it.