[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46877] Unreachable return statement after err
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll |
Date: |
Mon, 11 Jan 2016 21:34:06 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
URL:
<http://savannah.gnu.org/bugs/?46877>
Summary: Unreachable return statement after error call in
lex.ll
Project: GNU Octave
Submitted by: rik5
Submitted on: Mon 11 Jan 2016 01:34:05 PM PST
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Other
Status: None
Assigned to: jwe
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
The code in lex.ll uses return statements after error statements. Now that
Octave uses exceptions in error processing this code is unreachable and
should--probably--be removed.
There are 7 instances:
1021: // FIXME: This is no longer reachable now that error is exception
based.
1074: // FIXME: This is no longer reachable now that error is exception
based.
2907: // FIXME: This is no longer reachable now that error is exception
based.
2927: // FIXME: This is no longer reachable now that error is exception
based.
2947: // FIXME: This is no longer reachable now that error is exception
based.
2997: // FIXME: This is no longer reachable now that error is
exception based.
3291: // FIXME: This is no longer reachable now that error is exception
based.
For reference, the first instance near line 1021 is
<DQ_STRING_START>{NL} {
curr_lexer->lexer_debug ("<DQ_STRING_START>{NL}");
curr_lexer->input_line_number++;
curr_lexer->current_input_column = 1;
error ("unterminated character string constant");
// FIXME: This is no longer reachable now that error is exception based.
return LEXICAL_ERROR;
}
The question at hand is whether the unreachable code should just be deleted?
Or whethere the error should be downgraded to a warning and lex should return
LEXICAL_ERROR and let the calling program, presumably Bison, deal with it.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46877>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll,
Rik <=
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/12
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, Rik, 2016/01/12
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/12
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/12
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/14
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, Rik, 2016/01/14
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/14
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/14