This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23257] Incorrect exception-handling behavior with references
- From: "chris dot rimmer at antixlabs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jan 2008 12:08:07 -0000
- Subject: [Bug c++/23257] Incorrect exception-handling behavior with references
- References: <bug-23257-332@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from chris dot rimmer at antixlabs dot com 2008-01-16 12:08 -------
I've just encountered the same issue. My reading of the standard says that it
is a bug.
15.3 [except.handle] paragraph 3
A handler is a match for an exception object of type E if
- The handler is of type cv T or cv T& and [...]
- the handler is of type cv T or cv T& and [...]
- the handler is of type cv1 T* cv2 and E is a pointer type that can be
converted to the type of the handler by [...]
[...]
Note the lack of "or cv1 T* cv2 &" in the third list item.
Interestingly, the document "The Exception Handling ABI for the ARM
Architecture"
(http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf)
defines (in 8.4.2 - Personality routine helper functions) a function
__cxa_type_match which takes an argument 'bool is_reference_type'.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23257