Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!seismo!esosun!cogen!celerity!billd From: billd@celerity.UUCP (Bill Davidson) Newsgroups: comp.lang.c Subject: Re: A curriosity in the C compiler... Message-ID: <181@celerity.UUCP> Date: 29 Oct 88 03:58:43 GMT Article-I.D.: celerity.181 References: <530@uvicctr.UUCP> <588@quintus.UUCP> Reply-To: billd@celerity.UUCP (Bill Davidson) Organization: FPS Computing, San Diego CA Lines: 16 In article <530@uvicctr.UUCP> sbanner1@uvicctr.UUCP (S. John Banner) writes: > This is a quick test of the C compiler, for implied bracketing... >This will determine if the expression "a = b == c" is parsed >as "(a = b) == c" (which is correct), or as "a = (b == c)" (which is not). ACK! Please refer to page 49 of K&R or any other C book which has a precedence table. "a = b == c" must be parsed as "a = (b == c)" by laws of precedence which have been in C for a very long time. A C programmer who does not know his precedence laws by heart had better use a lot of parentheses or he can expect a LOT of problems. --Bill Davidson These are my own opinions and FPS doesn't even know about them. ....!ucsd!celerity!billd