This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Weird New libjava Testsuite Failure (PR java/14104)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]