This is the mail archive of the gcc@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]

Re: Problems with a unified error-handling API



  In message <199904061954.PAA14210@blastula.phys.columbia.edu>you write:
  > The killer, however, is the side effects.  How exactly is error()
  > supposed to prevent output?  It could set a global flag - fine, but
  > that flag is named differently in different programs, and might not
  > even exist.  In cpplib, for example, there are no globals, only a
  > `reader' structure that's passed to every function.  You could pass a
  > pointer to the flag in the wrapper function, but that's just as much
  > work as doing it yourself, except you're less likely to forget.
I'd prefer to avoid the global variable.  Having an extra arg for state set
by the error handlers isn't too bad.

However, don't forget that we'd like other languages we don't control
(particularly pascal & ada) to be able to plug in with minimal work, so
we don't want to change things too radically unless there is a major upside.

jeff


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