diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2005-12-30 17:27:28 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2005-12-30 17:27:28 +0000 |
commit | a176426f3573d5eceb4f60caf01a291ab778e475 (patch) | |
tree | ffda47dc57c458a506ebdbf3be62d77501367c05 /gcc/c-pretty-print.h | |
parent | cf013e9fdbd98b7798cbd88f126000c72361c56c (diff) | |
download | gcc-a176426f3573d5eceb4f60caf01a291ab778e475.zip gcc-a176426f3573d5eceb4f60caf01a291ab778e475.tar.gz gcc-a176426f3573d5eceb4f60caf01a291ab778e475.tar.bz2 |
c-pretty-print.h (struct c_pretty_print_info): Add new member "constant".
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.
From-SVN: r109176
Diffstat (limited to 'gcc/c-pretty-print.h')
-rw-r--r-- | gcc/c-pretty-print.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/c-pretty-print.h b/gcc/c-pretty-print.h index 0f9d46a..14cb670 100644 --- a/gcc/c-pretty-print.h +++ b/gcc/c-pretty-print.h @@ -80,6 +80,7 @@ struct c_pretty_print_info c_pretty_print_fn statement; + c_pretty_print_fn constant; c_pretty_print_fn id_expression; c_pretty_print_fn primary_expression; c_pretty_print_fn postfix_expression; @@ -129,6 +130,8 @@ struct c_pretty_print_info #define pp_statement(PPI, S) \ pp_c_base (PPI)->statement (pp_c_base (PPI), S) +#define pp_constant(PP, E) \ + pp_c_base (PP)->constant (pp_c_base (PP), E) #define pp_id_expression(PP, E) \ pp_c_base (PP)->id_expression (pp_c_base (PP), E) #define pp_primary_expression(PPI, E) \ |