🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #2555

Tin 1.17 assert macro syntax error on HP-UX

#2555
From: Hiroto Shibuya
Date: Mon, 23 Nov 1992 22:58
42 lines
1815 bytes
The use of macro "assert" defined in "tin.h" fails with syntax error
with the following configuration.

	HP 9000/710
	HP-UX 08.07
	CC = cc

With this configuration, the first definition of assert is chosen from
the following nested definition in tin.h.

/*
 *  Assertion verifier
 */

#if __STDC__ || defined(SVR4)
#	ifndef apollo
#		define	assert(p)	if(! (p)) asfail(__FILE__, __LINE__, #p); else
#	else
#		define	assert(p)	if(! (p)) asfail(__FILE__, __LINE__, "p"); else
#	endif
#else
#	define	assert(p)	if(! (p)) asfail(__FILE__, __LINE__, "p"); else
#endif

For example, in "group.c" when it is used as 

	assert (n > 0)

it expands as 

	if(! (n > 0)) asfail("group.c", 861, #n > 0); else;

and result in syntax error.

What is the proper nesting of this conditional choices of assert?  
--

					Hiroto Shibuya
			
					Applicon Inc.
					Billerica, MA
					U.S.A.
Technical Details
Message-ID: <SHIBUYA.92Nov23175847@chute.bl.applicon.slb.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.sources.d.mbox.zip!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!ut-emx!slcs.slb.com!aa.cad.slb.com!bl.cad.slb.com!coach!shibuya
References: <1992Nov15.144307.18718@anl433.uucp>

Show Full Headers
Complete Article Headers
Message-ID: <SHIBUYA.92Nov23175847@chute.bl.applicon.slb.com>
Subject: Tin 1.17 assert macro syntax error on HP-UX
Date: Mon, 23 Nov 1992 22:58:47 +0000
From: shibuya@bl.applicon.slb.com (Hiroto Shibuya)
References: <1992Nov15.144307.18718@anl433.uucp>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.sources.d.mbox.zip!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!ut-emx!slcs.slb.com!aa.cad.slb.com!bl.cad.slb.com!coach!shibuya
Newsgroups: news.software.readers,alt.sources.d
Sender: usenet@mailhost.bl.cad.slb.com (USENET Administrator)
Reply-To: shibuya@bl.applicon.slb.com
Organization: Applicon; Billerica, MA (USA)
Lines: 42
In-Reply-To: Iain.Lea%anl433.uucp@Germany.EU.net's message of 15 Nov 92 14:43:07 GMT