Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!we13!ihnp4!harpo!decvax!cca!ima!inmet!Anonymous From: Anonymous@inmet.UUCP Newsgroups: net.lang.c Subject: Re: Subtle C's - (nf) Message-ID: <1345@inmet.UUCP> Date: Sat, 5-May-84 03:11:00 EDT Article-I.D.: inmet.1345 Posted: Sat May 5 03:11:00 1984 Date-Received: Sun, 29-Apr-84 07:32:50 EDT Lines: 23 #R:acf4:-1390000300:inmet:5000014:000:632 inmet!Anonymous Apr 26 09:09:00 1984 [] > 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; } OK, I give up. What's the difference? According to my copy of K&R, they both have only one parse, and they differ only by the compound-statement step in the second example. Thus they shouldn't be different in meaning. Is there some C compiler that generates different code? I'd call it a bug. John M Chambers [inmet!jc] Intermetrics, Inc. 735 Concord Ave. Cambridge, MA 02138 "I don't have any solution but I certainly admire the problem."