gcc warns for memmove (0, b, 0)
Andrew Haley
aph@redhat.com
Wed Nov 16 12:01:00 GMT 2016
On 16/11/16 11:45, Prathamesh Kulkarni wrote:
> I am not sure though how to interpret this in context of above example.
This is for GCC help, not general help with C.
However,
ISO/IEC 9899:2011
7.24.1 String function conventions
Where an argument declared as size_t n specifies the length of the
array for a function, 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, as described in 7.1.4.
More information about the Gcc-help
mailing list