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
Tom> I've finally updated this patch. I think I've addressed all the review
Tom> comments.
Ping.
Tom
> "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
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
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
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,
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
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
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