[ODE] Re: Latest Code and MsVC
Russ Smith
russ at q12.org
Thu Dec 6 12:21:01 2001
> Looks very much compiler-specific, accepting an empty arg.
yes - i just tried this and apparently MSVC gives a warning for
FOO(a,) if FOO is #defined to take two args. however i dont think
this prevents compile, and there's a pragma to turn off warnings
(though i'm not sure if it will work for preprocessor warnings).
i'd like to know what the CPP spec allows here?
> Furthermore, I got it to compile with MSVC++7 (beta) without problems
> it seems, but with VC6 I get:
>
> Q:\src\libs\ode\ode.cpp(312) : warning C4291: 'void *__cdecl dBase::operator
> new(unsigned int)' : no matching operator delete found; memory will not be
> freed if initialization throws an exception
> Q:\src\libs\ode\objects.h(39) : see declaration of 'new'
strange ... i never had this problem with MSVC++ 6. dBase is the base
class for many ODE objects (body, joint etc) so if memory is really not
being freed this is a problem. note that delete[] is declared but never
used.
russ.
--
Russell Smith
http://www.q12.org