This is the mail archive of the 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: [PATCH] Optimize sprintf(buffer,"foo")

On Mon, 23 Jun 2003, Jakub Jelinek wrote:

> Then, if we have some way to find out at compile time the target platform
> provides stpcpy in libc (dunno whether explicit stpcpy prototype would
> be enough or whether we need some #pragma or whatever),

We'd actually like also to know whether the target provides __stpcpy in
libc since ISO C programs could redefine stpcpy.

I'd like a general mechanism by which a libc header file can be included
at the start of all compilations if it exists (and silently ignored if it
doesn't), to get the definition of __STDC_ISO_10646__ (which describes
libc features but must be available for the whole translation unit) right.
Perhaps such a header could also contain pragmas like "#pragma GCC
libc_provides stpcpy".

(Such a header of course must _only_ have such macros and pragmas - it
can't include any other glibc headers that test feature test macros, as
those may be defined in the source file at any point before it includes
standard headers.)

Joseph S. Myers

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