Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 17 Jul 2012 21:31:37 -0500 Message-ID: <50062006.7A2A@mindspring.com> Date: Tue, 17 Jul 2012 22:31:34 -0400 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.lang.c Subject: Re: Precedence Misunderstanding References: <874np7j8br.fsf@blp.benpfaff.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 52 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.154.223.127 X-Trace: sv3-7bJeX+As01zgoGe8c7nLdLwF+2gRl9/ykxqFrqJ1ADkieg5insy5lICjAFK4viLsKviY9XNy46peNb8!/dAmX084+kGOzA05Lj0rym4uWLe3AjVzZMYST7rYfKBR7HHNLJAX612TtBQupp+aN9ucsI8YDSBD!U5Nki7S9sLc= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1787 X-Received-Bytes: 1928 Xref: csiph.com comp.lang.c:23353 Charles Richmond wrote: > I can *not* understand how "&&" > can have a higher precedence than "||"... > when it seems to make *no* difference in *any* expression I've seen. Here's a counter example, which shows that a || b && c is different from (a || b) && c /* BEGIN new.c output */ a ac /* END new.c output */ /* BEGIN new.c */ #include #define a printf("a") #define b (printf("b") - 1) #define c puts("c") int main(void) { puts("/* BEGIN new.c output */\n"); a || b && c; puts("\n"); (a || b) && c; puts("\n/* END new.c output */\n"); return 0; } /* END new.c */ -- pete