Clean ups for error handling
Gabriel Dos Reis
gdr@codesourcery.com
Thu Jul 20 22:53:00 GMT 2000
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
More information about the Gcc-patches
mailing list