This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58796] throw nullptr not caught by catch(type*)
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Jul 2016 16:24:59 +0000
- Subject: [Bug c++/58796] throw nullptr not caught by catch(type*)
- Auto-submitted: auto-generated
- References: <bug-58796-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58796
--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #12)
> For a pointer to member function that's still problematic because the
> exception object for 'throw nullptr' is currently one word, and a pointer to
> member function is two. So I suppose we will need to allocate two words for
> 'throw nullptr'. But clang doesn't do that; do they actually handle
> catching nullptr as a pointer to member function?
But then again, testing whether a PMF is null only checks the first word on
non-ARM targets, so we can probably get away with still only allocating the one
word and setting it to NULL. ARM will probably need to allocate two words.