svn 14566

Rob Landley rob at
Mon Mar 20 16:10:34 UTC 2006

On Monday 20 March 2006 2:51 am, Mihai Buha wrote:
> > From: Rob Landley
> > Does changing the order really making a difference?  Are you
> > saying that "if
> > (x=5 && 0)" _won't_ optimize out?  (If the first thing is a
> > function call
> > that might have a side effect, I could see it.  But x && 0
> > not optimizing out
> > is a bug in the compiler.  Have you actually _seen_ this bug?
> Not sure if this bug has been seen. I didn't even looked up
> svn 14566. But to call "buggy" a compiler that simply follows the
> operator associativity rules as set by the C standard, looks to
> me like an exaggeration...

x==5 && 0 is a constant 0.

0 && x==5 is a constant 0.

How does that involve operator associativity rules?  If x==5 becomes a 
statement whose result is discarded, then the statement may be discarded 
unless it has side effects, which the compiler can trivially tell it doesn't.

> > Rob
> Mihai Buha
> This e-mail (including any attachments to it) is confidential, proprietary,
> legally privileged, subject to copyright and is sent for the personal
> attention of the intended recipient only.

You do realise that by sending this to a public list, you basically mean that 
it doesn't apply _anywhere_, right?  (If it ever gets to court the defense is 
"They stick exactly the same notice on things they post over public urinals, 
how the heck am I supposed to know in which context they do and don't mean 

Never bet against the cheap plastic solution.

More information about the busybox mailing list