Frank Schönheit - Sun Microsystems Germany wrote:
Hi Stephan,
At OSL_DEBUG_LEVEL == 0,
OSL_VERIFY(callFoo(bar) == good);
is just
((void)(callFoo(bar) == good);
which you also trust the compiler to simplify.
Honestly: no, I wouldn't.
Huh? I assume you do use OSL_VERIFY. So you either do not care about
the compiler optimizing the code; in that case, why worry what the
compiler does with "if(!...)OSL_ASSERT(false);"? Or you trust the
compiler to optimize away OSL_VERIFY when OSL_DEBUG_LEVEL == 0, which
contradicts your above sentence.
> I would have expected that this is simply
expanded to
callFoo(bar) == good
There's probably a reason for this not working, which I overlook, is there?
The cast to void is probably in OSL_VERIFY to not provoke compiler
warnings about unused code.
Just trust the compiler to do its job.
Uhm, well, yes ...
Thanks & Ciao
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]