This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28656] duplicated null argument warning on memcpy()
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Oct 2006 12:43:50 -0000
- Subject: [Bug c++/28656] duplicated null argument warning on memcpy()
- References: <bug-28656-1186@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from falk at debian dot org 2006-10-13 12:43 -------
>From the standard:
[...] n can have the value zero on a call to that function. Unless
explicitly stated otherwise in the description of a particular
function in this subclause, pointer arguments on such a call shall
still have valid values.
So the warning is justified (but not giving it twice).
For the missing warning on the second memcpy, please file a second report since
this is a totally different problem (and would require some aliasing analysis
to detect).
--
falk at debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|unhelpful null argument |duplicated null argument
|warning on memcpy() |warning on memcpy()
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28656