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]

Re: Clean ups for error handling


Zack Weinberg <zack@wolery.cumb.org> writes:

| On Fri, Jul 21, 2000 at 02:14:31AM +0200, Gabriel Dos Reis wrote:
| > Zack Weinberg <zack@wolery.cumb.org> writes:
| > 
| > | Now that we have diagnostic.c, we can put fancy_abort there instead of
| > | in rtl.c.
| > 
| > Zack,
| > 
| > It is Ok to put in diagnostic.c any language-independent diagnostic
| > subroutines.  Diagnostic.c should, eventually, contains only such
| > kind of beasts.
| 
| I think fancy_abort() qualifies - do you disagree?

No, it is OK.

[...]

| > For readability purpose I'd much prefer:
| > 
| > 
| >     if (count_error (warn))
| >        {
| >           os = diagnostic_buffer->state;
| >           diagnostic_msg = msg;
| >           diagnostic_args = args_ptr;
| >           /* ... */
| >           finish_diagnostic ();
| >           output_destroy_prefix (diagnostic_buffer);
| >           diagnostic_buffer->state = os;
| >        }
| 
| I will change it.  And I just discovered that diagnostic_for_decl
| needs the same change - btw, are there any plans to get rid of that?
| format_with_decl is quite evil...

Yes!  Actually, as you may have noted, format_with_decl is just the
old v_message_with_decl made to use small part of the new
infrastructure.  In the near future, it will be removed in favor of
output_format.  I'm working on that.

Thanks,

--  Gaby
CodeSourcery, LLC                             http://www.codesourcery.com

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