https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94615

--- Comment #3 from Allison Karlitskaya <allison.karlitskaya at redhat dot com> 
---
(In reply to Richard Biener from comment #1)
> Maybe use memcpy then, str* routines generally expect nul-termination

"str* routines generally expect nul-termination" doesn't really fly as an
argument, I'm afraid.  I'm using strncpy() because I've very carefully read the
manpage and determined that its standards-specified behaviour is exactly what I
want, and this behaviour specifically includes the possibility of no nul
termination.

(In reply to Florian Weimer from comment #2)
> If this is true (of which I'm not yet sure), we are missing a nonstring
> attribute in the glibc header. Either way, it's not a GCC bug, sorry.

That's really useful information.  I didn't know that this attribute already
exists.  Now just to convince the glibc people to add it...

Reply via email to