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]
Other format: [Raw text]

Re: [PATCH] Optimize sprintf(buffer,"foo")


On Mon, Jun 23, 2003 at 04:07:18PM +0100, Joseph S. Myers wrote:
> 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.

They can, but when you are already compiling with -std=gnu89 or -std=gnu99
and without -fno-nonansi-builtins, if there is a stpcpy prototype, GCC
assumes certain semantics of that function and thus any incompatible
redefinition of that function would result only in surprises.

	Jakub


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