Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site cybvax0.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!cybvax0!aug From: aug@cybvax0.UUCP (Alan Green) Newsgroups: net.lang.c Subject: Re: C-Debug package ... (a la "context-independent macros") Message-ID: <337@cybvax0.UUCP> Date: Sun, 3-Feb-85 18:00:05 EST Article-I.D.: cybvax0.337 Posted: Sun Feb 3 18:00:05 1985 Date-Received: Mon, 4-Feb-85 05:34:29 EST References: <1885@wateng.UUCP> <1089@hcrvx1.UUCP> <33@daisy.UUCP> <1097@hcrvx1.UUCP> <1924@wateng.UUCP> <11839@gatech.UUCP> Reply-To: aug@cybvax0.UUCP (Alan Green) Organization: Cybermation, Inc., Cambridge, MA Lines: 21 Summary: > Okay, folks, we've discussed this one before. The macro > > #define assert(x) if (!(x)) die_miserably("x bombed\n") > > doesn't work because of problems with a missing else. It was suggested > ... Whats wrong with: #define assert(cond) ( (cond) ? 0 : \ (fprintf (stderr, \ "assertion failed at line %d in file %s\n", \ __LINE__, __FILE__), \ exit(-1) \ ) \ ) ??? harvard!cybvax0!aug