🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #544

Re: C preprocessor question

#544
From: pedz
Date: Wed, 04 Feb 1987 17:11
19 lines
1351 bytes
In article <55@umich.UUCP> jtr485@umich.UUCP (Johnathan Tainter) writes:
>The #if is not going to evaluate the expression (((0) << 8) | (0))
>The #if takes an expression defined (recursively) by:
>an <expression> is
>	1) an integer string
>     or 2) (<expression> | <expression>)
>     or 3) (<expression> & <expression>)
>and nothing else.

This may be how it works but is not how it is defined.  The value
after the #if is suppose to be a constant expression.  Constant
expressions include almost all of the operators including << and
?:.  I refer you to K&R section 15 page 211.  Notice that it is
suppose to include sizeof which cpp can not cope with either.  i.e.
cpp is -----.
-- 
Perry Smith
pedz@bobkat
{ti-csl,infotel}!pollux!bobkat!pedz
Technical Details
Message-ID: <539@bobkat.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!seismo!ut-sally!ut-ngp!infotel!pollux!bobkat!pedz
References: <818@wjvax.wjvax.UUCP> <55@umich.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!seismo!ut-sally!ut-ngp!infotel!pollux!bobkat!pedz
From: pedz@bobkat.UUCP
Newsgroups: comp.bugs.4bsd
Subject: Re: C preprocessor question
Message-ID: <539@bobkat.UUCP>
Date: Wed, 4-Feb-87 12:11:50 EST
Article-I.D.: bobkat.539
Posted: Wed Feb  4 12:11:50 1987
Date-Received: Sat, 7-Feb-87 11:44:24 EST
References: <818@wjvax.wjvax.UUCP> <55@umich.UUCP>
Reply-To: pedz@bobkat.UUCP (Pedz Thing)
Organization: Digital Lynx, Inc; Dallas, TX
Lines: 19
Keywords: preprocessor, UNIX, BSD