[PATCH] Optimize sprintf into strcpy if possible (take 3)

Joseph S. Myers jsm28@cam.ac.uk
Thu Apr 19 11:06:00 GMT 2001


On Wed, 18 Apr 2001, Richard Henderson wrote:

> On Wed, Apr 18, 2001 at 08:06:54PM +0100, Joseph S. Myers wrote:
> > > +  printf ("%d\n" - 1, i);	/* { dg-warning ...
> > 
> > Is this a PLUS_EXPR with negative addend, or a MINUS_EXPR?
> 
> Should be the former.

Running in the debugger says it is a MINUS_EXPR (and so not testing the
relevant case in the patch - which '"%d\n" + -1' would test).

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc-patches mailing list