aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-semantics.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@gcc.gnu.org>2003-11-24 20:12:06 +0000
committerEric Christopher <echristo@gcc.gnu.org>2003-11-24 20:12:06 +0000
commite13e48e70711cf7328c91eedf04ad4771dc9a002 (patch)
tree4b0dd5bf92fd53863d57bb29f006b3c57aff1bf0 /gcc/c-semantics.c
parent8273c02d611966557eff0bedb92f841e854738b1 (diff)
downloadgcc-e13e48e70711cf7328c91eedf04ad4771dc9a002.zip
gcc-e13e48e70711cf7328c91eedf04ad4771dc9a002.tar.gz
gcc-e13e48e70711cf7328c91eedf04ad4771dc9a002.tar.bz2
re PR c/13014 (if shortcut misses required diagnostics)
2003-11-24 Eric Christopher <echristo@redhat.com> PR C/13014 * c-decl.c (c_in_iteration_stmt, c_in_case_stmt): New. (start_function): Use. (c_push_function_context): Ditto. (c-pop_function_context): Ditto. (language_function): Move... * c-tree.h: ... here. Add x_in_iteration_stmt, and x_in_case_stmt. * c-parse.in (do_stmt_start, select_or_iter_stmt, stmt): Use c_in_iteration_stmt, c_in_case_stmt for parser state. Move check for valid break or continue statment here... * c-semantics.c (genrtl_break_stmt, genrtl_continue_stmt): From here. Change original errors to abort. From-SVN: r73887
Diffstat (limited to 'gcc/c-semantics.c')
-rw-r--r--gcc/c-semantics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index a3e1b45..f3c61b4 100644
--- a/gcc/c-semantics.c
+++ b/gcc/c-semantics.c
@@ -592,7 +592,7 @@ genrtl_break_stmt (void)
{
emit_line_note (input_location);
if ( ! expand_exit_something ())
- error ("break statement not within loop or switch");
+ abort ();
}
/* Build a continue statement node and return it. */
@@ -610,7 +610,7 @@ genrtl_continue_stmt (void)
{
emit_line_note (input_location);
if (! expand_continue_loop (0))
- error ("continue statement not within a loop");
+ abort ();
}
/* Generate the RTL for T, which is a SCOPE_STMT. */