aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@codesourcery.com>2000-08-25 12:31:00 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2000-08-25 12:31:00 +0000
commit22a4158c6afcab145ec63f3bd81907a19754b04f (patch)
tree7dac5eca160b8c42c4c3447805ac96ceca6dca5f
parent135ebc3673ad7f952d7a2911b4ee9945855fa3ad (diff)
downloadgcc-22a4158c6afcab145ec63f3bd81907a19754b04f.zip
gcc-22a4158c6afcab145ec63f3bd81907a19754b04f.tar.gz
gcc-22a4158c6afcab145ec63f3bd81907a19754b04f.tar.bz2
* error.c (cp_tree_printer): Rework.
From-SVN: r35981
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/error.c73
2 files changed, 44 insertions, 33 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e68534c..7a7514c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
+
+ * error.c (cp_tree_printer): Rework.
+
2000-08-25 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
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;