C Quirk??

Rahul Dhesi dhesi at bsu-cs.UUCP
Thu Feb 18 11:29:53 AEST 1988


In article <413 at fig.bbn.com> rsalz at bbn.com (Rich Salz) writes:
>As a general rule, you probably don't want to use { } in #define's
>as  { }; is not the same as { }.

Thomas Plum says this should work:

#define stuff(x)         do { ... } while (0)
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi



More information about the Comp.lang.c mailing list