[Scummvm-devel] Warning hunt

Bertrand Augereau bertrand_augereau at yahoo.fr
Tue Jul 20 15:29:33 CEST 2004


> > Well, reinterpret_cast is something we have had issues with in the past
> > and it should be avoided (the main problem here is non-gcc compilers
> > like MSVC).
>
> We have had problems with that? I don't recall that -- only problems
> with dynamic_cast, which were caused by some targets (embedded ones?)
> not having RTTI support. However, reinterpret_cast does not depend on
> RTTI at all, so it should work even w/o RTTI support. "Should" ;-)
>

Yes, basically I have yet to see a compiler who has a problem with
reinterpret_cast (which seemingly always evaluate to a c-cast).
But there is the "Should", thus I asked ! ;-)

> In any case, I don't really see the point in this particular change,
> either. We *are* doing something evil in the OFFS/SIZE macros (as the
> comment right next to them explains). Changing it to use
> reinterpret_cast won't make it less hackish, would it?

Nope but at least, it would shut G++'s warnings up, because it would clearly
tell him the *evilness* (shudder :) ) is done on purpose...

Bertrand





More information about the Scummvm-devel mailing list