On 2/18/20 1:41 AM, Stephan Bergmann wrote:
On 03/12/2019 22:49, Martin Sebor wrote:
I added another warning: -Wredundant-tags to point out instances
where the class-key or enum-key can safely be dropped. Both warnings
are off by default.
I think -Wredundant-tags would be more useful if it did not warn about
occurrences within extern "C" (at least not within included files), as a
heuristic to filter out code that is shared between C and C++ and where
the tags are thus necessary.
I agree. Exempting C code in headers does seem like the right thing
to do. I opened bug 93804 to remember to get back to it for GCC 11.
Thanks
Martin