Path: utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!sdrc!thor!scjones From: scjones@thor.UUCP (Larry Jones) Newsgroups: comp.lang.c Subject: Re: &&** Message-ID: <165@thor.UUCP> Date: 10 Sep 90 13:00:31 GMT References: <1990Sep7.021321.18381@watmath.waterloo.edu> <0926@sheol.UUCP> Organization: SDRC, Cincinnati Lines: 20 In article <0926@sheol.UUCP>, throopw@sheol.UUCP (Wayne Throop) writes: > [ about compilers allowing "&(&(&(***x)))" ] > This is apparently a VERY common bug. It shakes my faith in > the competence of C implementors. Unless I'm missing something > quite major...??? It's a very easy mistake to make. Since both &* and *& are essentially noops, most compilers will remove adjacent pairs as part of the optimization of expression trees. Since tree rewriting is generally iterative, this results in all such pairs being removed. Semantic restrictions (like lvalueness) are generally not tested until after rewriting, so bogus code like this slips through. ---- Larry Jones UUCP: uunet!sdrc!thor!scjones SDRC scjones@thor.UUCP 2000 Eastman Dr. BIX: ltl Milford, OH 45150-2789 AT&T: (513) 576-2070 Why can't I ever build character in a Miami condo or a casino somewhere? -- Calvin