aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authorNicola Pero <nicola@gcc.gnu.org>2010-12-18 20:28:07 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-12-18 20:28:07 +0000
commit46270f141bec8186f01faf7ec216c57fd81e1463 (patch)
tree7e133229359caed0887f2fb805a0c54ecaa63de2 /gcc/c-parser.c
parentb5dca6ea71c1de8775d723d5af41618c3581ae68 (diff)
downloadgcc-46270f141bec8186f01faf7ec216c57fd81e1463.zip
gcc-46270f141bec8186f01faf7ec216c57fd81e1463.tar.gz
gcc-46270f141bec8186f01faf7ec216c57fd81e1463.tar.bz2
In gcc/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_objc_try_catch_finally_statement): Call objc_maybe_warn_exceptions. (c_parser_objc_synchronized_statement): Call objc_maybe_warn_exceptions. In gcc/cp/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_try_catch_finally_statement): Call objc_maybe_warn_exceptions. (cp_parser_objc_synchronized_statement): Same change. In gcc/c-family/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com> * c-objc.h (objc_maybe_warn_exceptions): New. * stub-objc.c (objc_maybe_warn_exceptions): New. In gcc/objc/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_init): Call using_eh_for_cleanups. (objc_init_exceptions): Renamed to objc_maybe_warn_exceptions. Do not call using_eh_for_cleanups. (objc_begin_try_stmt): Do not call objc_init_exceptions. (objc_build_throw_stmt): Updated call to objc_maybe_warn_exceptions. In gcc/testsuite/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/fobjc-exceptions-1.m: Updated. * objc.dg/fobjc-exceptions-2.m: New. * objc.dg/fobjc-exceptions-3.m: New. * obj-c++.dg/fobjc-exceptions-1.mm: New. * obj-c++.dg/fobjc-exceptions-2.mm: New. * obj-c++.dg/fobjc-exceptions-3.mm: New. From-SVN: r168032
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 261ea3d..4eaf868 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -7547,6 +7547,7 @@ c_parser_objc_try_catch_finally_statement (c_parser *parser)
gcc_assert (c_parser_next_token_is_keyword (parser, RID_AT_TRY));
c_parser_consume_token (parser);
location = c_parser_peek_token (parser)->location;
+ objc_maybe_warn_exceptions (location);
stmt = c_parser_compound_statement (parser);
objc_begin_try_stmt (location, stmt);
@@ -7628,6 +7629,7 @@ c_parser_objc_synchronized_statement (c_parser *parser)
gcc_assert (c_parser_next_token_is_keyword (parser, RID_AT_SYNCHRONIZED));
c_parser_consume_token (parser);
loc = c_parser_peek_token (parser)->location;
+ objc_maybe_warn_exceptions (loc);
if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
{
expr = c_parser_expression (parser).value;