public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: shroff@transeda.com
To: gcc-gnats@gcc.gnu.org
Subject: java/5941: incorrect "Unreachable statement" error
Date: Wed, 13 Mar 2002 11:36:00 -0000 [thread overview]
Message-ID: <20020313192620.9340.qmail@sources.redhat.com> (raw)
>Number: 5941
>Category: java
>Synopsis: incorrect "Unreachable statement" error
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 13 11:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Saurin Shroff
>Release: GNU Java version 3.0.1 (sparc-sun-solaris2.8)
>Organization:
>Environment:
Sun/Sparc Solaris
>Description:
I get:
hdlFSM.java:448: Unreachable statement.
for (int i=lowIndex; i <= highIndex; i++) {
^
1 error
The variable lowIndex and highIndex are set just before the
loop. Here is the partial code:
int highIndex = dependency.hdlmGetHighIndex();
int lowIndex = dependency.hdlmGetLowIndex();
for (int i=lowIndex; i <= highIndex; i++) {
if ( dependencyDeclaration.hdlmIsRegister(i) ||
dependencyDeclaration.hdlmIsLatch(i) ) {
/* encountered a register other then state variable */
return true;
}
Object "dependency" is of type "hdlDependency" which is an
interface. The hdlmGetHighIndex and hdlmGetLowIndex are
methods described in the interface and are implemented in
classes that implement the interface.
There was one similar loop in the file before line 448, but
no error was issued against it.
Here is the command line I used and the result:
% gcj -v -C --encoding=UTF-8 -CLASSPATH /home/shroff/work hdlFSM.java
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/specs
Configured with: ../configure --with-as=/usr/local/bin/as --with-ld=/usr/local/bin/ld --enable-libgcj
Thread model: posix
gcc version 3.0.1
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/jc1 hdlFSM.java -quiet -dumpbase hdlFSM.java -g1 -version -fencoding=UTF-8 -fencoding=UTF-8 -fCLASSPATH=/home/shroff/work -fsyntax-only -femit-class-files -o /dev/null
GNU Java version 3.0.1 (sparc-sun-solaris2.8)
compiled by GNU C version 3.0.1.
hdlFSM.java: In class `dualsoft.rules.hdlFSM':
hdlFSM.java: In method `dualsoft.rules.hdlFSM.checkForPIAndNonStateVariables(java.util.Vector,dualsoft.rules.hdlDeclInterface,dualsoft.rules.hdlDeclInterface)':
hdlFSM.java:448: Unreachable statement.
for (int i=lowIndex; i <= highIndex; i++) {
^
1 error
Le me know if you want any other information.
-- Saurin
shroff@transeda.com
P.S
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
next reply other threads:[~2002-03-13 19:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-13 11:36 shroff [this message]
2002-03-13 12:16 Tom Tromey
2002-03-13 12:56 Saurin B. Shroff
2002-03-25 13:26 Tom Tromey
2002-03-25 14:46 Eric Blake
2002-04-01 16:46 Eric Blake
2002-04-01 16:56 Tom Tromey
2002-04-01 19:46 Per Bothner
2002-04-25 11:47 tromey
2002-05-06 21:14 tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020313192620.9340.qmail@sources.redhat.com \
--to=shroff@transeda.com \
--cc=gcc-gnats@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).