This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/28656] duplicated null argument warning on memcpy()



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]