Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site hadron.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!ucbvax!ucdavis!lll-crg!seismo!rlgvax!hadron!jsdy From: jsdy@hadron.UUCP (Joseph S. D. Yao) Newsgroups: net.lang.c Subject: Cpp: if/else/else/endif????? Message-ID: <143@hadron.UUCP> Date: Wed, 25-Dec-85 11:18:53 EST Article-I.D.: hadron.143 Posted: Wed Dec 25 11:18:53 1985 Date-Received: Sat, 28-Dec-85 01:04:07 EST Reply-To: jsdy@hadron.UUCP (Joseph S. D. Yao) Organization: Hadron, Inc., Fairfax, VA Lines: 24 Keywords: cpp, #ifdef, #else Summary: Unexpected extra else behaviour [I don't believe in line-eaters, and refuse to feed theMUNCH I noticed something rather peculiar, in kernel (network) code no less. If you have multiple #else's between an #ifdef and the #endif ... they work! That is, given input like: #ifdef X X is #else X is not #else X is #endif then, cpp'ed with no X you get X is not and cpp'ed with -DX, you get 1 is 1 is If anybody out there has a cpp that does n o t do this, please e-mail to me (do not post!) and I will summarise. [Extra garbage like #line's or blank lines doesn't count, because they were there and I edited them out.] -- Joe Yao hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}