PROTECTED] On Behalf Of Martin Sebor
Sent: Thursday, April 10, 2008 7:40 PM
To: dev@stdcxx.apache.org
Subject: Re: Null src pointer in memcpy?
This is explicitly required in 7.1.4 of C99:
7.1.4 Use of library functions
-1- Each of the following statements applies unless
explicitly stated
Sent: Thursday, April 10, 2008 7:40 PM
To: dev@stdcxx.apache.org
Subject: Re: Null src pointer in memcpy?
This is explicitly required in 7.1.4 of C99:
7.1.4 Use of library functions
-1- Each of the following statements applies unless
explicitly stated
otherwise
Is it safe to pass a null pointer as the 2nd argument to memcpy()? Or
undefined?
Brad.
-Original Message-
From: Eric Lemings [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 10, 2008 5:42 PM
To: dev@stdcxx.apache.org
Subject: Null src pointer in memcpy?
Is it safe to pass a null pointer as the 2nd argument to memcpy()? Or
undefined?
The function is documented to copy
Eric Lemings wrote:
Is it safe to pass a null pointer as the 2nd argument to memcpy()? Or
undefined?
Assuming the third argument is 0. Strictly speaking I believe it's
undefined because memcpy(s1, s2, n) is specified to copy n bytes
from the object pointed to by s2 into the object pointed
This is explicitly required in 7.1.4 of C99:
7.1.4 Use of library functions
-1- Each of the following statements applies unless explicitly stated
otherwise in the detailed descriptions that follow: If an argument
to a function has an invalid value (such as a value outside