This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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: [libc-alpha] Re: [open-source] Re: Wish for 2002 ...


On Sat, 12 Jan 2002, Sandy Harris wrote:
> "Martin v. Loewis" wrote:
> 
> > Notice that -liberty offers this as concat(const char* first, ...).
> 
> That strikes me as a function worth having, though perhaps not in standard
> libraries.

I'd rather have the compiler analyze *printf format strings and
generate code.  There is no reason why 

  snprintf(d, sizeof d, "%s%s", s1, s2)

can't be compiled into calls to some compiler run-time support
function that catenates directly.

The GNU compiler can already analyze the format string for the purpose
of error checking; the next obvious step is code generation.

In priciple, a compiled sprintf can do anything which a variable-argument
concat can do, just as efficiently.


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