This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]