Re: [PATCH] C: fixits for modernizing structure member designators

2016-09-15 Thread David Malcolm
On Thu, 2016-09-15 at 11:27 -0600, Jeff Law wrote: > On 08/30/2016 08:38 AM, David Malcolm wrote: > > This patch adds fix-it hints to our warning for old-style structure > > member designators, showing how to modernize them to C99 form. > > > > For example: > > > > modernize-named-inits.c:19:5: w

Re: [PATCH] C: fixits for modernizing structure member designators

2016-09-15 Thread Jeff Law
On 08/30/2016 08:38 AM, David Malcolm wrote: This patch adds fix-it hints to our warning for old-style structure member designators, showing how to modernize them to C99 form. For example: modernize-named-inits.c:19:5: warning: obsolete use of designated initializer with ‘:’ [-Wpedantic] foo

Re: [PATCH] C: fixits for modernizing structure member designators

2016-08-31 Thread David Malcolm
On Wed, 2016-08-31 at 11:09 +0200, Marek Polacek wrote: > On Tue, Aug 30, 2016 at 11:22:21AM -0400, David Malcolm wrote: > > On Tue, 2016-08-30 at 16:50 +0200, Marek Polacek wrote: > > > On Tue, Aug 30, 2016 at 04:40:57PM +0200, Bernd Schmidt wrote: > > > > On 08/30/2016 04:38 PM, David Malcolm wro

Re: [PATCH] C: fixits for modernizing structure member designators

2016-08-31 Thread Marek Polacek
On Tue, Aug 30, 2016 at 11:22:21AM -0400, David Malcolm wrote: > On Tue, 2016-08-30 at 16:50 +0200, Marek Polacek wrote: > > On Tue, Aug 30, 2016 at 04:40:57PM +0200, Bernd Schmidt wrote: > > > On 08/30/2016 04:38 PM, David Malcolm wrote: > > > > > > > In conjunction with the not-yet-in-trunk -fdi

Re: [PATCH] C: fixits for modernizing structure member designators

2016-08-30 Thread David Malcolm
On Tue, 2016-08-30 at 16:50 +0200, Marek Polacek wrote: > On Tue, Aug 30, 2016 at 04:40:57PM +0200, Bernd Schmidt wrote: > > On 08/30/2016 04:38 PM, David Malcolm wrote: > > > > > In conjunction with the not-yet-in-trunk -fdiagnostics-generate > > > -patch, > > > this can generate patches like thi

Re: [PATCH] C: fixits for modernizing structure member designators

2016-08-30 Thread Marek Polacek
On Tue, Aug 30, 2016 at 04:40:57PM +0200, Bernd Schmidt wrote: > On 08/30/2016 04:38 PM, David Malcolm wrote: > > > In conjunction with the not-yet-in-trunk -fdiagnostics-generate-patch, > > this can generate patches like this: > > > > --- modernize-named-inits.c > > +++ modernize-named-inits.c >

Re: [PATCH] C: fixits for modernizing structure member designators

2016-08-30 Thread Bernd Schmidt
On 08/30/2016 04:38 PM, David Malcolm wrote: In conjunction with the not-yet-in-trunk -fdiagnostics-generate-patch, this can generate patches like this: --- modernize-named-inits.c +++ modernize-named-inits.c @@ -16,7 +16,7 @@ /* Old-style named initializers. */ struct foo old_style_f = { -

[PATCH] C: fixits for modernizing structure member designators

2016-08-30 Thread David Malcolm
This patch adds fix-it hints to our warning for old-style structure member designators, showing how to modernize them to C99 form. For example: modernize-named-inits.c:19:5: warning: obsolete use of designated initializer with ‘:’ [-Wpedantic] foo: 1, ^ . = In conjunction with the not