[Bug c/95379] Don't warn about the universal zero initializer for a structure with the 'designated_init' attribute.

2020-06-03 Thread AsDaGo at posteo dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95379 --- Comment #16 from Asher Gordon --- I just submitted a patch here[1] to fix this bug. Note that I did not implement -Wno-universal-initializer, I just made it behave like that by default. However, it should be fairly easy to implement -Wno-univ

[Bug c/95379] Don't warn about the universal zero initializer for a structure with the 'designated_init' attribute.

2020-05-31 Thread AsDaGo at posteo dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95379 --- Comment #15 from Asher Gordon --- (In reply to Luc Van Oostenryck from comment #14) > I've now changed Sparse's default so that these warnings are not issued > anymore. Thanks Luc. (In reply to Tom Tromey from comment #7) > The feature was

[Bug c/95379] Don't warn about the universal zero initializer for a structure with the 'designated_init' attribute.

2020-05-28 Thread AsDaGo at posteo dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95379 --- Comment #13 from Asher Gordon --- Do you think that it would be possible to add something like Sparse's -Wno-universal-initializer and use it by default? As Linus says here[1], Sparse defaults tend to be kernel-centric, but I don't think ther

[Bug c/95379] Don't warn about the universal zero initializer for a structure with the 'designated_init' attribute.

2020-05-28 Thread AsDaGo at posteo dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95379 --- Comment #12 from Asher Gordon --- (In reply to Luc Van Oostenryck from comment #11) > Sparse already has this option. Also, I don't think it would help here since > from I understand the OP want these warnings but not if they're caused by > u

[Bug c/95379] Don't warn about the universal zero initializer for a structure with the 'designated_init' attribute.

2020-05-28 Thread AsDaGo at posteo dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95379 --- Comment #8 from Asher Gordon --- (In reply to Tom Tromey from comment #7) > The feature was added specifically to mimic what sparse does. > If sparse changes, I think changing gcc would be appropriate. I just report a bug to Sparse here: htt

[Bug c/95379] Don't warn about the universal zero initializer for a structure with the 'designated_init' attribute.

2020-05-28 Thread AsDaGo at posteo dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95379 --- Comment #6 from Asher Gordon --- (In reply to Tom Tromey from comment #5) > Since this warning is intended to work like sparse, introducing > a divergence here would seem to make the feature less useful, > in fact subverting the point of havi

[Bug c/95379] Don't warn about the universal zero initializer for a structure with the 'designated_init' attribute.

2020-05-27 Thread AsDaGo at posteo dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95379 --- Comment #3 from Asher Gordon --- Thanks for the quick reply! (In reply to Andrew Pinski from comment #1) > Why not just use { .foo = 0 }; instead? Well I could do that, but I feel that it doesn't convey the message of "set all fields to zer

[Bug c/95379] New: Don't warn about the universal zero initializer for a structure with the 'designated_init' attribute.

2020-05-27 Thread AsDaGo at posteo dot net
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: AsDaGo at posteo dot net Target Milestone: --- Created attachment 48623 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48623&a