Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!usc!snorkelwacker!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Using Macros Message-ID: <17298@haddock.ima.isc.com> Date: 8 Aug 90 23:00:09 GMT References: <362.26be9dcc@astro.pc.ab.com> <21057@grebyn.com> <642@travis.csd.harris.com> Reply-To: karl@kelp.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 8 In article <642@travis.csd.harris.com> brad@SSD.CSD.HARRIS.COM (Brad Appleton) writes: > #define CHECK(cond) ((cond) || exit(-1)) Won't work if exit() is properly declared as void. Try one of #define CHECK(cond) ((cond) ? exit(-1) : (void)0) #define CHECK(cond) ((cond) || (exit(-1), 0)) Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint