Re: [AD] CVS freeze and 4.1.17 |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Chris wrote:
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.
Multiple statements should be expanded with do{ ... }while(0) brackets. However, it is common for assert-style macros to expand to nothing, which is why I suggested the braces.
Peter
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |