[Scummvm-devel] Re: [Scummvm-cvs-logs] CVS: scummvm/simon sound.cpp,1.30,1.31

Max Horn max at quendi.de
Thu Jul 24 06:39:17 CEST 2003


Am Donnerstag, 24.07.03 um 15:32 Uhr schrieb Nicolas Noble:

>> That makes no sense! "delete 0" is legal and perfectly valid according
>> to the ISO C++ standard. Hence that code is 100% equivalent to the old
>> code, i.e. this:
>>   if (_voice)
>>     delete _voice;
>>
>> is equivalent to
>>    delete _voice;
>
> Please allow me to answer. You're completely right: this is perfectly
> valid ISO C++ standard. However, some compilers/librairies are deaf, 
> and
> will more or less show their lameness to such doings with a page fault.
> So, yeah, you're right, it makes no bloody difference. Expect when it
> comes to porting and compiling it to some %!@#!@%#@$ platforms (who 
> said I
> already had the bug, and spent some hours finding it shouting "why 
> does it
> works on this platform and not on this f...ing one?!"?)
>
You mean there are compilers violating the standard in such a 
fundamental way? Can you name me some? So far I never encountered that 
problem (and note that we do delete on NULL-pointers in lots of places 
in ScummVM).


Cheers,

Max





More information about the Scummvm-devel mailing list