This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Warning on C++ catch by value on non primitive types


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]