[Bug c++/72751] anonymous union within an anonymous union accepted without diagnostic (i.e. add -Wnested-anon-types)

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72751

--- Comment #5 from Marek Polacek  ---
We should also make sure that __extension__ suppresses the -Wnested-anon-types
diagnostic.

[Bug c++/72751] anonymous union within an anonymous union accepted without diagnostic (i.e. add -Wnested-anon-types)

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72751

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #4 from Marek Polacek  ---
Test from Bug 113919:

struct _ {
union
{
union {
int __;
};
};
};

int main(){return 0;}

[Bug c++/72751] anonymous union within an anonymous union accepted without diagnostic (i.e. add -Wnested-anon-types)

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72751

Marek Polacek  changed:

   What|Removed |Added

 CC||tsqurt at outlook dot com

--- Comment #3 from Marek Polacek  ---
*** Bug 113919 has been marked as a duplicate of this bug. ***

[Bug c++/72751] anonymous union within an anonymous union accepted without diagnostic (i.e. add -Wnested-anon-types)

2018-10-09 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72751

Eric Gallager  changed:

   What|Removed |Added

   Keywords||diagnostic
 Blocks||87403
Summary|anonymous union within an   |anonymous union within an
   |anonymous union accepted|anonymous union accepted
   ||without diagnostic (i.e.
   ||add -Wnested-anon-types)

--- Comment #2 from Eric Gallager  ---
Since implementing the warning that clang gives would count as a new warning,
making this block the meta-bug for new warnings


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
[Bug 87403] [Meta-bug] Issues that suggest a new warning