Thanks for the review, much appreciated. Agreed on all those points, I'll remove it from -Wextra and just leave it as a standalone warning, and I'll add those tests you suggested.

On 02/06/2025 19:08, Joseph Myers wrote:
On Sun, 1 Jun 2025, Peter Frost wrote:

Ping https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672568.html

This needs various coding style fixes.  Lines should be broken before
binary operators such as && or || rather than after, and there should be a
space before '(' in function and macro calls.

I don't think this belongs in -Wextra.  For example, it's incompatible
with the use of designated initializers for any structure in standard
headers that has named padding fields - or indeed any structure in
standard headers that has some fields that are implementation extensions
that are irrelevant to the particular application.

I would expect the new tests to include cases of nested structures where
the initializations are done in the form ".a.b.c = 1" and similar.
Likewise, in the array tests, consider

   { [0].a = 1, [1].b = 2, [0].b = 3, [0].c = 4 }

and similar (this is a case where all of .a, .b, .c are initialized in
[0], so there should be no warning for missing initializers in [0] if
those are the only struct members, but .a and .c are missing initializers
in [1]).


Reply via email to