bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bison-1.28a Remove bug


From: Hans Aberg
Subject: Bison-1.28a Remove bug
Date: Thu, 5 Oct 2000 10:43:15 +0200

I still have a problem with the temporaries not getting removed; recall I
use the ISO C remove(). The problem is that my implementation of remove()
requires files to be closed before getting removed.

The problem shows up in some types of errors, for example, in the case of
the the error "ill-formed rule: initial symbol not followed by colon" which
can be produced by inserting some garbage at the beginning of a line in the
grammar definition section, in which case the tmptabfile and the
tmpdefsfile are not removed.

Therefore, I inserted this patch in done(), even though a problem with it
is that these files may be closed twice, which I do not know whether it is
OK with ISO C:

#endif /* MSDOS || (_WIN32 && !__CYGWIN32__) */
#if __MWERKS__ && macintosh
  if (actfile && ! no_parser_flag)  remove(actfile);
  if (tmpattrsfile)  remove(tmpattrsfile);
  if (tmptabfile) {
    fclose(ftable);
    remove(tmptabfile);
  }
  if (tmpdefsfile) {
    fclose(fdefines);
    remove(tmpdefsfile);
  }
#endif
/* Don't call exit again, we're in atexit ().
  exit (complain_message_count ? 1 : 0); */
#endif /* not VMS, or __VMS_POSIX */

  Hans Aberg





reply via email to

[Prev in Thread] Current Thread [Next in Thread]