On Oct 12, 2005, at 2:20 PM, Thomas Costa wrote:
gcc doesn't have such a warning at present.
Yup.
Is this correct?
I suspect so.
What are the chances of adding such a warning?
Zero, unless someone else wants it or you file a bug report asking
for the enhancement. Be sure to explain why it is a good idea,
otherwise the chances of it happening could drop to zero.
Is it basic enough to add to the 3.4.x and/or 4.x C++ front end
that I could help with the task?
Sure.
Look at the parser (gcc/cp/parser.c:cp_parser_handler) and set a
break point there, follow it down into semantic processing, pick a
nice place to do the checking, and then add the code to check it.
For it to be accepted, others would have to agree it is a good thing
to have, for example, if it were in the Effective C++ book, you can
argue that way.