This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
throw lists and warnings
- To: gcc at gcc dot gnu dot org
- Subject: throw lists and warnings
- From: Andrew Marlow <apm35 at student dot open dot ac dot uk>
- Date: Fri, 30 Mar 2001 15:43:08 +0100
Who else thinks throw lists are useless? ANSI seem to think so. The
standard library is defined to throw exceptions under certain
circumstances but the methods do not have these exceptions stated in a
throw list.
I would like to see throw lists used more but we all know why they are
not. It is because the penalty for making a mistake is DEATH. And no-one
wants to die. I propose that the GNU compiler has a command line option
that enables warnings when throw lists are violated.
Once the GNU compiler supports this it might be possible to get ANSI to
put throw lists in the official method descriptions for methods that are
defined to throw exceptions under certain conditions.
Thoughts, anyone?
-Andrew Marlow.