[Scummvm-devel] Re: Broken C++ compilers [was ... CVS: scummvm/simon sound.cpp,1.30,1.31]
Kevin Harris
kpharris at networld.com
Thu Jul 24 18:08:02 CEST 2003
----- Original Message -----
From: "Max Horn" <max at quendi.de>
Sent: Thursday, July 24, 2003 7:38 AM
Subject: Re: [Scummvm-devel] Re: [Scummvm-cvs-logs] CVS: scummvm/simon
sound.cpp,1.30,1.31
>
> 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).
I used to run into that problem all the time with an older (pre-standard)
version
of Borland C++ (I think it was 3.0 or 3.1). I don't remember if 4.5 or 5.x
share
the bug, as I haven't used them in a few years. I haven't seen that problem
in any
modern C++ compiler.
I know that I'm not a registered developer on this project, but I don't
think you
should support horribly broken compilers when GCC is supported on most
common platforms (and a few unusual ones).
-Kevin-
More information about the Scummvm-devel
mailing list