This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/61294] [4.9 Regression] erroneous memset used with constant zero length parameter warning
- 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: Wed, 25 Jun 2014 11:37:00 +0000
- Subject: [Bug middle-end/61294] [4.9 Regression] erroneous memset used with constant zero length parameter warning
- Auto-submitted: auto-generated
- References: <bug-61294-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61294
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I wonder if we just shouldn't move this warning to GCC and in glibc remove it
if sufficiently new GCC version is used.
GCC could then warn about this in the FEs, only in the cases where user likely
made a mistake (i.e. when third argument is literal 0 (rather than e.g. an
expression folded to 0) and second argument is not literal 0.