Re: [AD] CVS freeze and 4.1.17

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Evert Glebbeek wrote:
I don't know exactly what ASSERT() compiles to in release mode, but on the off chance that it compiles to nothing at all, I've included it (otherwise, code such as
else
   ASSERT(...)

if (...)
   /* stuff */

becomes broken in release mode).

I believe ASSERT expands to something along the lines of:
(0 ? al_assert(...) : 0)
in release mode. I would hope that if ASSERT ever expands to a multi-command macro, it'd be put into its own braces. Needing to put a single pre-preprocessor command into its own brackets because of what it might expand into is poor coding on the macro, IMO. A macro that expands into multiple commands should have its own brackets in the define, or be an inline function.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/