mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-07 13:29:16 +08:00
Fix fortran failure reported by Craig Burley.
* stmt.c (check_seenlabel): When search for line number note for warning, handle case where there is no such note. From-SVN: r19364
This commit is contained in:
parent
2c5873953f
commit
0dacbd0e17
@ -1,3 +1,8 @@
|
||||
1998-04-21 Jim Wilson <wilson@cygnus.com>
|
||||
|
||||
* stmt.c (check_seenlabel): When search for line number note for
|
||||
warning, handle case where there is no such note.
|
||||
|
||||
Tue Apr 21 20:48:37 1998 John Carr <jfc@mit.edu>
|
||||
|
||||
* genemit.c (gen_exp): Allow machine description to set mode of
|
||||
|
12
gcc/stmt.c
12
gcc/stmt.c
@ -3848,12 +3848,14 @@ check_seenlabel ()
|
||||
{
|
||||
do
|
||||
insn = PREV_INSN (insn);
|
||||
while (GET_CODE (insn) != NOTE || NOTE_LINE_NUMBER (insn) < 0);
|
||||
while (insn && (GET_CODE (insn) != NOTE || NOTE_LINE_NUMBER (insn) < 0));
|
||||
|
||||
warning_with_file_and_line (NOTE_SOURCE_FILE(insn),
|
||||
NOTE_LINE_NUMBER(insn),
|
||||
"unreachable code at beginning of %s",
|
||||
case_stack->data.case_stmt.printname);
|
||||
/* If insn is zero, then there must have been a syntax error. */
|
||||
if (insn)
|
||||
warning_with_file_and_line (NOTE_SOURCE_FILE(insn),
|
||||
NOTE_LINE_NUMBER(insn),
|
||||
"unreachable code at beginning of %s",
|
||||
case_stack->data.case_stmt.printname);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user