[Scummvm-devel] "free(0)" is valid C, and so is "delete 0;"

Max Horn max at quendi.de
Sun Aug 1 10:47:03 CEST 2004


Am 01.08.2004 um 13:44 schrieb Marcus Comstedt:

>
> Max Horn <max at quendi.de> writes:
>
>> [...] The C standard specifically defines that free(0) does
>> nothing. [...]
>>
>> To quote the POSIX docs:
> [...]
>>
>> Or to quote Microsoft:
> [...]
>
>
> Wouldn't it make more sense to quote the C standard?  :-)
>
Not really. After all, just because the C standard says something 
doesn't mean Visual C(++) does it :-). Hence I made sure to include a 
quote which proves that VC does it this way, too (or rather, a proof 
that VC is *supposed* to do it this way, too <grin>).


Bye,

Max





More information about the Scummvm-devel mailing list