------- Comment #4 from tkoenig at gcc dot gnu dot org 2007-12-26 17:33 -------
Currently testing this patch.
Index: error.c
===================================================================
--- error.c (revision 131146)
+++ error.c (working copy)
@@ -410,6 +410,13 @@ translate_error (int code)
void
generate_error (st_parameter_common *cmp, int family, const char *message)
{
+
+ /* If there was a previous error, don't mask it with another
+ error message, EOF or EOR condition. */
+
+ if ((cmp->flags & IOPARM_LIBRETURN_MASK) == IOPARM_LIBRETURN_ERROR)
+ return;
+
/* Set the error status. */
if ((cmp->flags & IOPARM_HAS_IOSTAT))
*cmp->iostat = (family == LIBERROR_OS) ? errno : family;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34594