egcs-19980502, sprintf bug in haifa-sched.c ...
Jeffrey A Law
law@cygnus.com
Wed May 6 00:21:00 GMT 1998
In message < 199805051939.PAA00465@caip.rutgers.edu >you write:
> Here is a code snippet from egcs-19980502/gcc/haifa-sched.c
> which produces the following warning during bootstrap:
>
> > haifa-sched.c: In function `print_value':
> > haifa-sched.c:5996: warning: int format, pointer arg (arg 3)
> > haifa-sched.c:5996: warning: too many arguments for format
>
>
> > case SUBREG:
> > print_value (t, SUBREG_REG (x), verbose);
> > cur = safe_concat (buf, cur, t);
> > sprintf (t, "#%d", t, SUBREG_WORD (x));
> > cur = safe_concat (buf, cur, t);
> > break;
Well, I assume line 5996 is?
> > sprintf (t, "#%d", t, SUBREG_WORD (x));
I think it should be:
sprintf (t, "%s#%d", t, SUBREG_WORD (x));
But I haven't actually tested it to make sure it makes sense.
jeff
More information about the Gcc-bugs
mailing list