This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Weird New libjava Testsuite Failure (PR java/14104)
- From: Andrew Haley <aph at redhat dot com>
- To: "Ranjit Mathew" <rmathew at hotmail dot com>
- Cc: java at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 17 Mar 2004 14:47:46 +0000
- Subject: RE: Weird New libjava Testsuite Failure (PR java/14104)
- References: <BAY1-F94BSQxjyxEFut00009c2d@hotmail.com>
Ranjit Mathew writes:
> >The test failure "linking simple" is because the error handling in
> >opendir_in_zip() is quite insane. This patch tidies up that error
> >handling.
>
> That was real fast tracking and fixing - thanks Andrew!
>
> Now I get (i686-pc-linux-gnu, RHEL3):
> ------------------------------- 8< -------------------------------
> === libjava Summary ===
>
> # of expected passes 3308
> # of expected failures 14
> # of untested testcases 16
> ------------------------------- 8< -------------------------------
>
> [...]
> >! goto fail;
> [...]
> >! goto fail;
> [...]
> >! goto fail;
> [...]
> >+ fail:
>
> Dijkstra rolls in his grave:
>
The avoidance of using a goto for a clean error exit is, I suspect,
what caused this mess in the first place. Concentrating all the tidy
up code at the end of a routine is the right thing to do in this case.
Actually, as you can probably tell this is really a "finally" block in
disguise.
> http://www.acm.org/classics/oct95/
Feh. See "error handling" in "Structured programming with go to
statements".
Andrew.
Donald Knuth, ``"Structured Programming with go to Statements,''
Computing Surveys, Vol. 6, No. 4, December, 1974, page 268.