This is the mail archive of the
mailing list for the GCC project.
Re: Silently checking whether diagnostics would occur
- To: amylaar at cygnus dot co dot uk
- Subject: Re: Silently checking whether diagnostics would occur
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Thu, 14 Sep 2000 10:43:07 -0400 (EDT)
- Cc: gcc at gcc dot gnu dot org, gdr at codesourcery dot com
> From: Joern Rennecke <firstname.lastname@example.org>
> > So rather than do a complete restructuring of the format checking
> > function, I though it would be much easier and cleaner to be able to
> > call the checks conceptually like this:
> > > check_diagnostics_silently = 1; /* new global vars */
> > > diagnostic_occurred = 0;
> Simpler to implement the change, but cleaner?
> I can see it now. Somewhere down the line, someone uses this
> format checking in another utility function. That function gets
> called by another utility function under certain circumstances.
> That function is then used by some piece of format-checking code.
> After a few month of debugging, someone figures out why certain programs
> just won't show any format warnings beyond some point even if there are
> more problems left, and invents a stack for these global variables in
> a static array.
> The array overflows for another set of programs. It is replaced with
> a linked list of malloced structures.
> Some time later, other programs are seen to cause the compiler to gobble
> up all available memory the memory while parsing, making the host grind
> to a halt, because the mallocing of structures causes a memory leak
> when doing error recovery.
> So we sprinkle a few strategically garbage collector calls into the
> However, now some other data structures that should be live throughout the
> parsing stage will be freed prematurely...
Okay, you've convinced me. :-)
I'll do it another way.
Kaveh R. Ghazi Engagement Manager / Project Services
email@example.com Qwest Internet Solutions