another silly optimisation case
Matthew Kirkwood
weejock@ferret.lmh.ox.ac.uk
Wed Mar 31 23:46:00 GMT 1999
On Wed, 10 Mar 1999, Joern Rennecke wrote:
> > int f(int g) { return g ? 34 : 0; }
> > int g(int f) { return f && 34; }
> >
> > I don't suppose (x ? y : 0) is a hugely common construction
> > but it seems to be another candidate for simple optimisation.
> f (1) returns 34.
> g (1) returns 1.
Oops. Kill me now.
Perhaps I'll sleep a little more next time :)
Matthew.
More information about the Gcc
mailing list