&&**

Larry Jones scjones at thor.UUCP
Mon Sep 10 23:00:31 AEST 1990


In article <0926 at sheol.UUCP>, throopw at 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 at 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



More information about the Comp.lang.c mailing list