diff options
author | Gabriel Dos Reis <gdr@codesourcery.com> | 2000-08-25 12:31:00 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2000-08-25 12:31:00 +0000 |
commit | 22a4158c6afcab145ec63f3bd81907a19754b04f (patch) | |
tree | 7dac5eca160b8c42c4c3447805ac96ceca6dca5f /gcc/cp/error.c | |
parent | 135ebc3673ad7f952d7a2911b4ee9945855fa3ad (diff) | |
download | gcc-22a4158c6afcab145ec63f3bd81907a19754b04f.zip gcc-22a4158c6afcab145ec63f3bd81907a19754b04f.tar.gz gcc-22a4158c6afcab145ec63f3bd81907a19754b04f.tar.bz2 |
* error.c (cp_tree_printer): Rework.
From-SVN: r35981
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 73 |
1 files changed, 40 insertions, 33 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 74d3cba..8a48360 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -2651,43 +2651,50 @@ cp_tree_printer (buffer) ++output_buffer_text_cursor (buffer); } - if (*output_buffer_text_cursor (buffer) == 'P') + switch (*output_buffer_text_cursor (buffer)) + { + case 'A': + tree_being_formatted (&tfi) = + va_arg (output_buffer_format_args (buffer), tree); + print_function_argument_list (buffer, &tfi); + break; + + case 'D': + tree_being_formatted (&tfi) = + va_arg (output_buffer_format_args (buffer), tree); + print_declaration (buffer, &tfi); + break; + + case 'E': + tree_being_formatted (&tfi) = + va_arg (output_buffer_format_args (buffer), tree); + print_expression (buffer, &tfi); + break; + + case 'F': + tree_being_formatted (&tfi) = + va_arg (output_buffer_format_args (buffer), tree); + print_function_declaration (buffer, &tfi); + break; + + case 'P': print_function_parameter (buffer, va_arg (output_buffer_format_args (buffer), int)); - else - { + + case 'T': tree_being_formatted (&tfi) = va_arg (output_buffer_format_args (buffer), tree); - - switch (*output_buffer_text_cursor (buffer)) - { - case 'A': - print_function_argument_list (buffer, &tfi); - break; - - case 'D': - print_declaration (buffer, &tfi); - break; - - case 'E': - print_expression (buffer, &tfi); - break; - - case 'F': - print_function_declaration (buffer, &tfi); - break; - - case 'T': - print_type (buffer, &tfi); - break; - - case 'V': - print_cv_qualifier (buffer, &tfi); - break; - - default: - return 0; - } + print_type (buffer, &tfi); + break; + + case 'V': + tree_being_formatted (&tfi) = + va_arg (output_buffer_format_args (buffer), tree); + print_cv_qualifier (buffer, &tfi); + break; + + default: + return 0; } return 1; |