Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site watcgl.UUCP Path: utzoo!watmath!watcgl!dmmartindale From: dmmartindale@watcgl.UUCP (Dave Martindale) Newsgroups: net.lang.c Subject: Re: Subtle C's Message-ID: <2462@watcgl.UUCP> Date: Sun, 22-Apr-84 17:51:15 EST Article-I.D.: watcgl.2462 Posted: Sun Apr 22 17:51:15 1984 Date-Received: Mon, 23-Apr-84 01:29:20 EST References: <13900003@acf4.UUCP> Organization: U of Waterloo, Ontario Lines: 21 From: lwe3207@acf4.UUCP Message-ID: <13900003@acf4.UUCP> Date: Sat, 21-Apr-84 18:30:00 EST Another subtle non-equivalence: while (a) if (b) foo; else bar; is not a syntax error, but is not equal to while (a) { if (b) foo; else bar; } 1) If they aren't equivalent, what *is* the first one equivalent to? 2) Please tell us what compiler you are using when you make statements such as this. For the record, the 4.2BSD PCC-based compiler *does* treat the two statements as equivalent, and I cannot see any other interpretation allowed by the language. The "else" must be part of the if statement.