diff options
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r-- | gcc/cp/except.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 025262c..8bc831d 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "trans-mem.h" #include "attribs.h" #include "tree-iterator.h" +#include "target.h" static void push_eh_cleanup (tree); static tree prepare_eh_type (tree); @@ -927,6 +928,10 @@ is_admissible_throw_operand_or_catch_parameter (tree t, bool is_throw) if (!complete_ptr_ref_or_void_ptr_p (type, expr)) return false; + tree nonref_type = non_reference (type); + if (!verify_type_context (input_location, TCTX_EXCEPTIONS, nonref_type)) + return false; + /* 10.4/3 An abstract class shall not be used as a parameter type, as a function return type or as type of an explicit conversion. */ |