summaryrefslogtreecommitdiff
path: root/gcc/c-pretty-print.c
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-30 17:27:28 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-30 17:27:28 +0000
commitbb0c6c221a822a303d75a7619eed7fcf3b82e105 (patch)
treeffda47dc57c458a506ebdbf3be62d77501367c05 /gcc/c-pretty-print.c
parent4d4b9f0ed2d9e74591980f1bbb06ba957b9a629d (diff)
downloadgcc-bb0c6c221a822a303d75a7619eed7fcf3b82e105.tar.gz
2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (struct c_pretty_print_info): Add new member "constant". (pp_constant): New macro. * c-pretty-print.c (pp_c_pretty_printer_init): Set pp->constant. cp/ 2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net> * cxx-pretty-print.c (pp_cxx_constant): New. Print string-literal in parens if input program says so. (pp_cxx_primary_expression): Hand off constant printing to pp_cxx_constant. (pp_cxx_pretty_printer_init): Set pp->c_base.constant. (pp_cxx_expression): Use pp_cxx_constant for literals. * error.c (dump_expr): Use pp_constant for literals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109176 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-pretty-print.c')
-rw-r--r--gcc/c-pretty-print.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c
index 058d3b9644c..516022340ca 100644
--- a/gcc/c-pretty-print.c
+++ b/gcc/c-pretty-print.c
@@ -2001,6 +2001,7 @@ pp_c_pretty_printer_init (c_pretty_printer *pp)
pp->statement = pp_c_statement;
+ pp->constant = pp_c_constant;
pp->id_expression = pp_c_id_expression;
pp->primary_expression = pp_c_primary_expression;
pp->postfix_expression = pp_c_postfix_expression;