https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55578
--- Comment #11 from Lewis Hyatt <lhyatt at gcc dot gnu.org> --- (In reply to Vadim Zeitlin from comment #10) > There definitely was a change in behaviour in gcc 11 because I had to make > this change > > https://github.com/wxWidgets/wxWidgets/commit/ > 95c98a0b5ff71caca6654327bf341719c6587766 Thanks for that. I made a bisectable test that compiles allheaders.cpp (without your GCC 11-specific workaround in place) and counts the number of -Wsuggest-override warnings, which does indeed change in GCC 11.1 vs older and newer versions. The bisect confirmed that this issue was the same as that of PR100796. It existed only in GCC 11.1, as it was introduced by r11-7179 and was fixed by r12-1538, which was also backported to GCC 11.2. This particular issue only materializes with a sufficiently large source file, so I don't think you should find any "reasonably" sized testcase to reproduce it. All basic examples I tried work fine in 11.1 as well. As far as I can tell, I think your workaround should be needed only for sufficiently large translation units (approx 100000 lines or more), not for typical size user code, and I think it should be needed only for 11.1 and no other version. If you know otherwise, please advise... otherwise, I think this is resolved.