Re: [-Wstringop-overflow=] strncat(3)

2022-12-15 Thread Alejandro Colomar via Gcc
Hi Martin, On 12/15/22 21:50, Martin Sebor wrote: On 12/14/22 16:14, Alejandro Colomar via Libc-alpha wrote: [...]    int    main(void)    {    char    buf[BUFSIZ];    size_t  len;    buf[0] = '\0';  // There’s no ’cpy’ function

Re: [-Wstringop-overflow=] strncat(3)

2022-12-15 Thread Martin Sebor via Gcc
On 12/14/22 16:14, Alejandro Colomar via Libc-alpha wrote: [CC += groff] Hi Andrew, On 12/14/22 23:57, Andrew Pinski wrote: On Wed, Dec 14, 2022 at 2:46 PM Alejandro Colomar via Libc-alpha wrote: Hi, I was rewriting the strncat(3) manual page, and when I tried to compile the example

Re: [-Wstringop-overflow=] strncat(3)

2022-12-14 Thread Alejandro Colomar via Gcc
[CC += groff] Hi Andrew, On 12/14/22 23:57, Andrew Pinski wrote: On Wed, Dec 14, 2022 at 2:46 PM Alejandro Colomar via Libc-alpha wrote: Hi, I was rewriting the strncat(3) manual page, and when I tried to compile the example program, I got a surprise from the compiler. Here goes the page:

Re: [-Wstringop-overflow=] strncat(3)

2022-12-14 Thread Andrew Pinski via Gcc
On Wed, Dec 14, 2022 at 2:46 PM Alejandro Colomar via Libc-alpha wrote: > > Hi, > > I was rewriting the strncat(3) manual page, and when I tried to compile the > example program, I got a surprise from the compiler. > > Here goes the page: > > >strncat(3) Library Functions Manual

Re: [-Wstringop-overflow=] strncat(3)

2022-12-14 Thread Alejandro Colomar via Gcc
On 12/14/22 23:51, Alejandro Colomar wrote: On 12/14/22 23:45, Alejandro Colomar wrote: Hi, I was rewriting the strncat(3) manual page, and when I tried to compile the example program, I got a surprise from the compiler. Here goes the page:    strncat(3)   Library

Re: [-Wstringop-overflow=] strncat(3)

2022-12-14 Thread Alejandro Colomar via Gcc
On 12/14/22 23:45, Alejandro Colomar wrote: Hi, I was rewriting the strncat(3) manual page, and when I tried to compile the example program, I got a surprise from the compiler. Here goes the page:   strncat(3)   Library Functions Manual  strncat(3)   NAME  

[-Wstringop-overflow=] strncat(3)

2022-12-14 Thread Alejandro Colomar via Gcc
Hi, I was rewriting the strncat(3) manual page, and when I tried to compile the example program, I got a surprise from the compiler. Here goes the page: strncat(3) Library Functions Manual strncat(3) NAME strncat - concatenate a null‐padded