This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Preparsing sprintf format strings


On Wed, Oct 10, 2007 at 12:12:25AM -0400, Kaveh R. GHAZI wrote:
> One simplification I don't believe we do yet, that should always be a win,
> is turning:   sprintf (foo, "%c", bar);   into:    *foo = bar;

You need the null terminator: foo[0] = bar; foo[1] = 0;
But these things are rarely going to be a huge win, and I get
the impression that competing compiler developers only do them
when they help with standard benchmarks.


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