[ODE] Macros

Marco Grubert grubertm at hotmail.com
Wed Oct 2 13:06:02 2002


Hmm- I though this is self-evident. Maybe not, so here's a little
philosophical rant - sorry to bother the community with that.

> >// MSVC fixup.
> >#define for if (false); else for
> That is very good use of macros.. The way MSVC6.0 handles variable scope's
in
> for-loop's is a very frustrating bug,

This used to be the standard behavior of MSVC and GCC prior to ISO
standardization- Microsofts reason for not updating this to be more
compliant of course is to avoid breaking all your old code. Now I have tons
of legacy code which works perfectly fine - unless I include the mentioned
header file. So the exact same code works in one module (not using ODE) and
fails in the next because the header changes semantics.
You _can_ change the meaning of a keyword- the question is _should_ you
(even if it's morally okay, or it means you can stick a badge
"ISO-compliant" on your shirt)? As long as you are coding on your own this
is not an issue and you can redefine your C to look like Pascal - but when
trying to do a cross-platform library it's best not to mess with the user's
configuration.

I have run into a couple of other quirks so now I am compiling tricollider
as a static library again with its own setting instead of as part of my
project- even though I still think that using a "common grounds" approach
would be more suitable.

Thanks,
 Marco Grubert