Re[2]: [cc65] glitch in "assert.h" ?

Date view Thread view Subject view

From: groepaz (groepaz_at_gmx.net)
Date: 2002-08-13 10:00:28


Hello David,

Tuesday, August 13, 2002, 3:52:12 AM, you wrote:

>>"Note that assert must expand to a void expression, so the more
>>obvious if-statement does not suffice as a definition of
>>assert."

DH> #ifdef NDEBUG
DH> #  define assert(expr) {}
DH> ...

eh? say what?

the sentence above says that an if-statement is invalid as a
definition for assert, since it must be a void expression.

#define assert(expr)   if(expr)....

the other thing above isnt a void expression either (but an empty
block)

-- 
Best regards,
 groepaz                            mailto:groepaz_at_gmx.net


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-08-13 10:01:01 CEST