Re: [PATCH] add __attribute__ ((designated_init))

2014-07-29 Thread Joseph S. Myers
On Tue, 1 Jul 2014, Tom Tromey wrote: > 2014-07-01 Tom Tromey > > PR c/59855 > * doc/invoke.texi (Warning Options): Document -Wdesignated-init. > * doc/extend.texi (Type Attributes): Document designated_init > attribute. > > 2014-07-01 Tom Tromey > > PR c/598

Re: [PATCH] add __attribute__ ((designated_init))

2014-07-28 Thread Tom Tromey
Tom> I've finally updated this patch. I think I've addressed all the review Tom> comments. Ping. Tom

Re: [PATCH] add __attribute__ ((designated_init))

2014-07-01 Thread Tom Tromey
> "Joseph" == Joseph S Myers writes: [...] Joseph> Is there a reason someone using the attribute might not want the Joseph> warning? That is, why isn't -Wdesignated-init enabled by Joseph> default, given that it's only relevant to people using an Joseph> attribute whose sole function relate

Re: [PATCH] add __attribute__ ((designated_init))

2014-01-24 Thread Tom Tromey
Joseph> Is there a reason someone using the attribute might not want the Joseph> warning? That is, why isn't -Wdesignated-init enabled by Joseph> default, given that it's only relevant to people using an Joseph> attribute whose sole function relates to the warning? In making this change, I also r

Re: [PATCH] add __attribute__ ((designated_init))

2014-01-24 Thread Tom Tromey
Joseph> I think that's best (generally, %<%> or %q with anything quoting Joseph> a source-code construct - anything that would go in a Joseph> fixed-width font in documentation - "struct" is such a case, the Joseph> English word is "structure"). Makes sense. I'll fix it all up. Joseph> Is there

Re: [PATCH] add __attribute__ ((designated_init))

2014-01-24 Thread Joseph S. Myers
On Thu, 23 Jan 2014, Tom Tromey wrote: > In this error, should I use "%" rather than just plain "struct" > as well? I think that's best (generally, %<%> or %q with anything quoting a source-code construct - anything that would go in a fixed-width font in documentation - "struct" is such a case,

Re: [PATCH] add __attribute__ ((designated_init))

2014-01-23 Thread Tom Tromey
Joseph> I think the test should also cover cases with designators such Joseph> as .d.x = 1. >> +static tree handle_designated_init (tree *, tree, tree, int, bool *); Joseph> handle_designated_init_attribute would seem a better name. >> + error ("designated_init attribute is only valid on st

Re: [PATCH] add __attribute__ ((designated_init))

2014-01-23 Thread Joseph S. Myers
On Mon, 20 Jan 2014, Tom Tromey wrote: > I wrote a new test case covering the same cases that the sparse test > case covers. I also added tests for applying the attribute to > non-struct types; note that in this case sparse issues a warning but > gcc issues an error. I think an error is more app

[PATCH] add __attribute__ ((designated_init))

2014-01-20 Thread Tom Tromey
This adds __attribute__((designated_init)) and -Wdesignated-init, a feature from sparse. This is also PR c/59855. The name of the attribute and the option were chosen to be compatible with sparse. I added this warning to -Wall since it seemed like the kind of warning users would ordinarily want