Re: gcc warns for memmove (0, b, 0)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks everyone for the help!

On 16 November 2016 at 17:52, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote:
> On 16 November 2016 at 12:01, Andrew Haley wrote:
>> 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.
>>
>
> See also "Null pointer checks may be optimized away more aggressively"
> at https://gcc.gnu.org/gcc-4.9/porting_to.html



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux