I was exploring warnings offered by GCC using the gcc -Q --help=warning syntax. (See 3.2 Options Controlling the Kind of Output for more details on that.)
What occurred to me is that many (109 out of 250 with GCC version 6.4.1) warnings are not classified as C++. By that I mean they will not show up when doing a restricted query gcc -Q --help=warning,c++. (Out of curiosity, 81 warnings are classified as neither C++ nor C.)
Yet, at least some of those warnings do work in C++. As an example take -Waggregate-return. (See it on Compiler Explorer.)
The -Waggregate-return is disabled by default and I do know it is probably of little use anyway (see Confusion in regards to purpose/behavior of -Waggregate-return?). However, it is just an example, maybe there are some useful flags in those 109 of the same case.
So, why do some GCC warning flags not belong to the C++ language and yet work in C++? What is the rule here?