From d0f7899abb4d765cfe9da433cb17b38a425d55e8 Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Thu, 2 Dec 2010 00:25:42 +0000 Subject: In gcc/objc/: 2010-12-02 Nicola Pero In gcc/objc/: 2010-12-02 Nicola Pero * objc-act.c (objc_build_throw_stmt): Return error_mark_node and not NULL_TREE when a @throw is used outside of a @catch block. In gcc/cp/: 2010-12-02 Nicola Pero * parser.c (cp_parser_objc_throw_statement): Use cp_parser_expression, not cp_parser_assignment_expression, to parse the argument of a @throw. In gcc/testsuite/: 2010-12-02 Nicola Pero * objc.dg/exceptions-6.m: New. * obj-c++.dg/exceptions-6.mm: New. From-SVN: r167364 --- gcc/objc/objc-act.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/objc/objc-act.c') diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index b9cb650..7eba65e 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -5520,7 +5520,7 @@ objc_build_throw_stmt (location_t loc, tree throw_expr) || cur_try_context->current_catch == NULL) { error_at (loc, "%<@throw%> (rethrow) used outside of a @catch block"); - return NULL_TREE; + return error_mark_node; } /* Otherwise the object is still sitting in the EXC_PTR_EXPR -- cgit v1.1