diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2013-08-30 15:28:51 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2013-08-30 15:28:51 +0000 |
commit | 8f0e4d72f2905596ecb212e8824a0a0e1489bab8 (patch) | |
tree | 40b3409f70bac07a020c641005859d39639f0f47 /gcc/c-family/c-pretty-print.h | |
parent | dc8d7a0f7bbd5d24ba74066ea7d0262f7f732774 (diff) | |
download | gcc-8f0e4d72f2905596ecb212e8824a0a0e1489bab8.tar.gz |
c-pretty-print.h (c_pretty_printer::declaration): Now a virtual member function.
c-family/
* c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
member function.
(c_pretty_printer::declaration_specifiers): Likewise.
(c_pretty_printer::declarator): Likewise.
(c_pretty_printer::abstract_declarator): Likewise.
(c_pretty_printer::direct_abstract_declarator): Likewise.
(c_pretty_printer::direct_declarator): Likewise.
(c_pretty_printer::function_specifier): Likewise.
(pp_declaration): Adjust.
(pp_declaration_specifiers): Likewise.
(pp_abstract_declarator): Likewise.
(pp_direct_declarator): Likewise.
(pp_function_specifier): Likewise.
(pp_direct_abstract_declarator): Remove as unused.
(pp_c_declaration): Remove.
(pp_c_declaration_specifiers): Likewise.
(pp_c_declarator): Likewise.
(pp_c_direct_declarator): Likewise.
(pp_c_function_specifier): Likewise.
(pp_c_direct_abstract_declarator): Likewise.
* c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
from pp_c_abstract_declarator. Adjust.
(c_pretty_printer::direct_abstract_declarator): Rename from
pp_c_direct_abstract_declarator. Adjust.
(c_pretty_printer::function_specifier): Rename from
pp_c_function_specifier. Adjust.
(c_pretty_printer::declaration_specifiers): Rename from
pp_c_declaration_specifiers. Adjust.
(c_pretty_printer::direct_declarator): Rename from
pp_c_direct_declarator. Adjust.
(c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
(c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
(c_pretty_printer::c_pretty_printer): Do not assign to
declaration, declaration_specifiers, declarator,
direct_declarator, direct_abstract_declarator, function_specifier.
cp/
* cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
overrider.
(cxx_pretty_printer::declaration_specifiers): Likewise.
(cxx_pretty_printer::function_specifier): Likewise.
(cxx_pretty_printer::declarator): Likewise.
(cxx_pretty_printer::direct_declarator): Likewise.
(cxx_pretty_printer::abstract_declarator): Likewise.
(cxx_pretty_printer::direct_abstract_declarator): Likewise.
(pp_cxx_declaration): Remove.
* cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
Rename from pp_cxx_function_specifier. Adjust.
(cxx_pretty_printer::declaration_specifiers): Rename from
pp_cxx_decl_specifier_seq. Adjust.
(cxx_pretty_printer::direct_declarator): Rename from
pp_cxx_direct_declarator. Adjust.
(cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
Adjust.
(cxx_pretty_printer::abstract_declarator): Rename from
pp_cxx_abstract_declarator. Adjust.
(cxx_pretty_printer::direct_abstract_declarator): Rename from
pp_cxx_direct_abstract_declarator. Adjust.
(cxx_pretty_printer::declaration): Rename from
pp_cxx_declaration. Adjust.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
declaration, declaration_specifiers, function_specifier,
declarator, direct_declarator, abstract_declarator,
direct_abstract_declarator.
* error.c (dump_decl): Adjust.
From-SVN: r202109
Diffstat (limited to 'gcc/c-family/c-pretty-print.h')
-rw-r--r-- | gcc/c-family/c-pretty-print.h | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/gcc/c-family/c-pretty-print.h b/gcc/c-family/c-pretty-print.h index 62492c3bede..4ab420daea5 100644 --- a/gcc/c-family/c-pretty-print.h +++ b/gcc/c-family/c-pretty-print.h @@ -66,6 +66,13 @@ struct c_pretty_printer : pretty_printer virtual void statement (tree); + virtual void declaration (tree); + virtual void declaration_specifiers (tree); + virtual void function_specifier (tree); + virtual void declarator (tree); + virtual void direct_declarator (tree); + virtual void abstract_declarator (tree); + virtual void direct_abstract_declarator (tree); /* Points to the first element of an array of offset-list. Not used yet. */ int *offset_list; @@ -74,18 +81,11 @@ struct c_pretty_printer : pretty_printer /* These must be overridden by each of the C and C++ front-end to reflect their understanding of syntactic productions when they differ. */ - c_pretty_print_fn declaration; - c_pretty_print_fn declaration_specifiers; - c_pretty_print_fn declarator; - c_pretty_print_fn abstract_declarator; - c_pretty_print_fn direct_abstract_declarator; c_pretty_print_fn type_specifier_seq; - c_pretty_print_fn direct_declarator; c_pretty_print_fn ptr_operator; c_pretty_print_fn parameter_list; c_pretty_print_fn type_id; c_pretty_print_fn simple_type_specifier; - c_pretty_print_fn function_specifier; c_pretty_print_fn storage_class_specifier; c_pretty_print_fn initializer; @@ -94,20 +94,18 @@ struct c_pretty_printer : pretty_printer #define pp_c_tree_identifier(PPI, ID) \ pp_c_identifier (PPI, IDENTIFIER_POINTER (ID)) -#define pp_declaration(PP, T) (PP)->declaration (PP, T) +#define pp_declaration(PP, T) (PP)->declaration (T) #define pp_declaration_specifiers(PP, D) \ - (PP)->declaration_specifiers (PP, D) -#define pp_abstract_declarator(PP, D) (PP)->abstract_declarator (PP, D) + (PP)->declaration_specifiers (D) +#define pp_abstract_declarator(PP, D) (PP)->abstract_declarator (D) #define pp_type_specifier_seq(PP, D) (PP)->type_specifier_seq (PP, D) -#define pp_declarator(PP, D) (PP)->declarator (PP, D) -#define pp_direct_declarator(PP, D) (PP)->direct_declarator (PP, D) -#define pp_direct_abstract_declarator(PP, D) \ - (PP)->direct_abstract_declarator (PP, D) +#define pp_declarator(PP, D) (PP)->declarator (D) +#define pp_direct_declarator(PP, D) (PP)->direct_declarator (D) #define pp_ptr_operator(PP, D) (PP)->ptr_operator (PP, D) #define pp_parameter_list(PP, T) (PP)->parameter_list (PP, T) #define pp_type_id(PP, D) (PP)->type_id (PP, D) #define pp_simple_type_specifier(PP, T) (PP)->simple_type_specifier (PP, T) -#define pp_function_specifier(PP, D) (PP)->function_specifier (PP, D) +#define pp_function_specifier(PP, D) (PP)->function_specifier (D) #define pp_storage_class_specifier(PP, D) \ (PP)->storage_class_specifier (PP, D); @@ -150,14 +148,8 @@ void pp_c_attributes_display (c_pretty_printer *, tree); void pp_c_cv_qualifiers (c_pretty_printer *pp, int qualifiers, bool func_type); void pp_c_type_qualifier_list (c_pretty_printer *, tree); void pp_c_parameter_type_list (c_pretty_printer *, tree); -void pp_c_declaration (c_pretty_printer *, tree); -void pp_c_declaration_specifiers (c_pretty_printer *, tree); -void pp_c_declarator (c_pretty_printer *, tree); -void pp_c_direct_declarator (c_pretty_printer *, tree); void pp_c_specifier_qualifier_list (c_pretty_printer *, tree); -void pp_c_function_specifier (c_pretty_printer *, tree); void pp_c_type_id (c_pretty_printer *, tree); -void pp_c_direct_abstract_declarator (c_pretty_printer *, tree); void pp_c_type_specifier (c_pretty_printer *, tree); void pp_c_storage_class_specifier (c_pretty_printer *, tree); /* Expressions. */ |