aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1998-02-17 13:21:01 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1998-02-17 13:21:01 +0000
commitfeb60352fb581f0703adf017f3af3e7b955b8168 (patch)
tree052efe64382b179485b7313fe3abcb22f0037a00
parentbeb31faa5b56bf3a8b384d4ae9ef8f256610ed9b (diff)
downloadgcc-feb60352fb581f0703adf017f3af3e7b955b8168.zip
gcc-feb60352fb581f0703adf017f3af3e7b955b8168.tar.gz
gcc-feb60352fb581f0703adf017f3af3e7b955b8168.tar.bz2
Fix problems with last patch.
From-SVN: r18033
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/stmt.c11
2 files changed, 19 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8be0bd8..22f8817 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+Tue Feb 17 21:17:30 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * rtl.h (force_line_numbers, restore_line_number_status): Declare.
+ * emit-rtl.c (force_line_numbers, restore_line_number_status):
+ New functions.
+ * stmt.c (struct nesting): Replace seenlabel with line_number_status.
+ (expand_start_case): Adjust to this change.
+ (check_seenlabel): New function.
+ (pushcase, pushcase_range, expand_endcase): Use it.
+
Tue Feb 17 10:14:32 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* i386.md (adddi3): Add =!r,0,0,X alternative.
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 57caad7..012ca2b 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -3895,8 +3895,6 @@ pushcase (value, converter, label, duplicate)
index_type = TREE_TYPE (case_stack->data.case_stmt.index_expr);
nominal_type = case_stack->data.case_stmt.nominal_type;
- check_seenlabel ();
-
/* If the index is erroneous, avoid more problems: pretend to succeed. */
if (index_type == error_mark_node)
return 0;
@@ -3905,6 +3903,8 @@ pushcase (value, converter, label, duplicate)
if (value != 0)
value = (*converter) (nominal_type, value);
+ check_seenlabel ();
+
/* Fail if this value is out of range for the actual type of the index
(which may be narrower than NOMINAL_TYPE). */
if (value != 0 && ! int_fits_type_p (value, index_type))
@@ -4612,6 +4612,13 @@ expand_end_case (orig_index)
do_pending_stack_adjust ();
+ /* This might get an spurious warning in the presence of a syntax error;
+ it could be fixed by moving the call to check_seenlabel after the
+ check for error_mark_node, and copying the code of check_seenlabel that
+ deals with case_stack->data.case_stmt.line_number_status /
+ restore_line_number_status in front of the call to end_cleanup_deferral;
+ However, this might miss some useful warnings in the presence of
+ non-syntax errors. */
check_seenlabel ();
/* An ERROR_MARK occurs for various reasons including invalid data type. */