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: Call for testers: MPC-0.6 released


From: "Jakub Jelinek" <jakub@redhat.com>


man 3p sprintf says:


If copying takes place between objects that overlap as a result of a call to
sprintf() or snprintf(), the results are undefined.


ISO C99 7.19.6.6 has similar wording:

If copying takes place between objects that overlap, the behavior is undefined.
Jakub

Thanks for the details. (BTW, there's no 3p section on my linux box, and man 3 sprintf doesn't mention the undefined-ness. So thanks for the C99 reference.)


--Kaveh


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