Re: [PATCH v2] C, ObjC: Add -Wunterminated-string-initialization

2023-10-01 Thread Alejandro Colomar
On Sun, Oct 01, 2023 at 09:37:59AM +0200, Martin Uecker wrote: > > (I shortened the recipient list) > > Am Sonntag, dem 01.10.2023 um 02:55 +0200 schrieb Alejandro Colomar: > > > > > ... > > I ran the tests, and get some unexpected failure. I used dg-warning, > > but maybe I used it wrong? He

Re: [PATCH v2] C, ObjC: Add -Wunterminated-string-initialization

2023-10-01 Thread Martin Uecker
(I shortened the recipient list) Am Sonntag, dem 01.10.2023 um 02:55 +0200 schrieb Alejandro Colomar: > > ... > I ran the tests, and get some unexpected failure. I used dg-warning, > but maybe I used it wrong? Here's the output: > > ``` > output is: > /home/alx/src/gnu/gcc/wustr/gcc/testsui

Re: [PATCH v2] C, ObjC: Add -Wunterminated-string-initialization

2023-09-30 Thread Alejandro Colomar
Hi David, Sorry for the half-year delay! I have some update. :) On Fri, Mar 24, 2023 at 10:53:22AM -0400, David Malcolm wrote: > On Fri, 2023-03-24 at 14:39 +0100, Alejandro Colomar via Gcc-patches > wrote: > > Warn about the following: > > > >     char  s[3] = "foo"; > > > > Initializing a c

Re: [PATCH v2] C, ObjC: Add -Wunterminated-string-initialization

2023-03-24 Thread David Malcolm via Gcc-patches
On Fri, 2023-03-24 at 18:45 +0100, Alejandro Colomar wrote: > Hi David, > > On 3/24/23 15:53, David Malcolm wrote: > > On Fri, 2023-03-24 at 14:39 +0100, Alejandro Colomar via Gcc- > > patches > > wrote: > > > Warn about the following: > > > > > >     char  s[3] = "foo"; > > > > [...] > > > > -

Re: [PATCH v2] C, ObjC: Add -Wunterminated-string-initialization

2023-03-24 Thread Alejandro Colomar via Gcc-patches
Hi David, On 3/24/23 15:53, David Malcolm wrote: > On Fri, 2023-03-24 at 14:39 +0100, Alejandro Colomar via Gcc-patches > wrote: >> Warn about the following: >> >>     char  s[3] = "foo"; >> [...] >> --- >> >> Hi, > > Hi Alex, thanks for the patch. :) > >> >> I sent v1 to the wrong list.  Thi

Re: [PATCH v2] C, ObjC: Add -Wunterminated-string-initialization

2023-03-24 Thread David Malcolm via Gcc-patches
On Fri, 2023-03-24 at 14:39 +0100, Alejandro Colomar via Gcc-patches wrote: > Warn about the following: > >     char  s[3] = "foo"; > > Initializing a char array with a string literal of the same length as > the size of the array is usually a mistake.  Rarely is the case where > one wants to crea