aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cxx-pretty-print.h
AgeCommit message (Collapse)AuthorFilesLines
2011-10-26Implement C++11 user-defined literals.Ed Smith-Rowland1-0/+2
libcpp/ * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix, cpp_userdef_string_remove_type, cpp_userdef_string_add_type, cpp_userdef_char_remove_type, cpp_userdef_char_add_type, cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New. (cpp_classify_number): Classify unrecognized tokens as user-defined literals. * include/cpplib.h: Add new tokens for user-defined literals. * init.c: Add new preprocessor flag (cxx11). * lex.c: (lex_string, lex_raw_string): Handle user-defined literals including concatenation and promotion with suffixes. c-family/ * c-common.c (build_userdef_literal): New. * c-common.def: New tree code. * c-common.h (tree_userdef_literal): New tree struct and accessors. * c-lex.c (interpret_float): Add suffix parm. (c_lex_with_flags): Build literal tokens. cp/ * cp-objcp-common.c: (cp_tree_size) Return size of USERDEF_LITERAL tree. * cp-tree.h: (UDLIT_OP_*, UDLIT_OPER_P): Literal operator name tools. New tree code for user-defined literals. * cxx-pretty-print.h: (pp_cxx_userdef_literal) New. * cxx-pretty-print.c: (pp_cxx_userdef_literal) New. (pp_cxx_primary_expression, pp_cxx_expression): Use it. * decl.c: (cp_tree_node_structure): Return new tree code. (duplicate_decls): Check for raw vs. template operator conflicts. (grokfndecl, grokdeclarator): New checks for literal operators. * error.c: (dump_expr): Warn about user-defined literals in C++98 mode. (dump_function_name): Pretty printing. * mangle.c: (write_literal_operator_name): New. (write_unqualified_id, write_unqualified_name): Use it. * parser.c: (cp_parser_operator): Handle operator"". (cp_parser_userdef_char_literal, cp_parser_userdef_numeric_literal, cp_parser_userdef_string_literal): New. (cp_parser_primary_expression): Handle new user-defined literal tokens with new functions. * semantics.c: (potential_constant_expression_1): Add user-defined literals. * typeck.c (check_raw_literal_operator, check_literal_operator_args): New. From-SVN: r180536
2011-01-03Update Copyright years for files modified in 2010.Jakub Jelinek1-1/+2
From-SVN: r168438
2010-06-05c-common.c: Move to c-family/.Steven Bosscher1-1/+1
gcc/ChangeLog: * c-common.c: Move to c-family/. * c-common.def: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-format.h : Likewise. * c-gimplify.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c.opt: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pragma.h: Likewise. * c-pretty-print.c: Likewise. * c-pretty-print.h: Likewise. * c-semantics.c: Likewise. * stub-objc.c: Likewise. * gengtype.c (get_file_langdir): Special-case files in c-family/. (get_output_file_with_visibility): Fix name for c-common.h. * c-config-lang.in: Update paths in gtfiles for files in c-family/. * c-tree.h: Update include path for moved files. * c-lang.c: Likewise. * c-lang.h: Likewise. * c-parser.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-objc-common.c: Likewise. * configure.ac: Make sure c-family/ exists in the build directory. * configure: Regenerate. * Makefile.in: Update paths for moved files. Regroup files per location and update dependencies. Move generated_files down after ALL_GTFILES_H. * config/spu/spu-c.c: Update paths for moved files. * config/mep/mep-pragma.c: Likewise. * config/darwin-c.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/i386-c.c: Likewise. * config/avr/avr-c.c: Likewise. * config/sol2-c.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm-c.c: Likewise. * config/h8300/h8300.c: Likewise. * config/v850/v850-c.c: Likewise. * config/t-darwin: Fix dependencies for moved files. * config/t-sol2: Fix dependencies for moved files. * config/mep/t-mep: Fix dependencies for moved files. * config/ia64/t-ia64: Fix dependencies for moved files. * config/rs6000/t-rs6000: Fix dependencies for moved files. * config/v850/t-v850: Fix dependencies for moved files. * config/v850/t-v850e: Fix dependencies for moved files. * config/m32c/m32c-pragma.c * po/exgettext: Look in c-family/ also. c-family/ChangeLog: * c-common.c: Include gt-c-family-c-common.h. * c-pragma.c: Include gt-c-family-c-pragma.h. objc/ChangeLog: * objc-act.c: Update include path for moved files. * objc-lang.c: Likewise. * config-lang.in: Update paths in gtfiles for files in c-family/. objcp/ChangeLog: * objcp-lang.c: Update include path for moved files. * config-lang.in: Update paths in gtfiles for files in c-family/. cp/ChangeLog: * typeck.c: Update include path for moved files. * decl.c: Likewise. * rtti.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * cxx-pretty-print.h: Likewise. * decl2.c: Likewise. * parser.c: Likewise. * cp-objcp-common.c: Likewise. * cp-tree.h: Likewise. * name-lookup.c: Likewise. * lex.c: Likewise. * name-lookup.h: Likewise. * config-lang.in: Update paths in gtfiles for files in c-family/. * Make-lang.in: Likewise. From-SVN: r160330
2009-05-01c-objc-common.c (c_tree_printer): Print identifiers with pp_identifier, not ↵Joseph Myers1-1/+2
pp_string. * c-objc-common.c (c_tree_printer): Print identifiers with pp_identifier, not pp_string. Mark "({anonymous})" for translation. * c-pretty-print.c (pp_c_ws_string): New. (pp_c_cv_qualifier, pp_c_type_specifier, pp_c_specifier_qualifier_list, pp_c_parameter_type_list, pp_c_storage_class_specifier, pp_c_function_specifier, pp_c_attributes, pp_c_bool_constant, pp_c_constant, pp_c_primary_expression, pp_c_postfix_expression, pp_c_unary_expression, pp_c_shift_expression, pp_c_relational_expression, pp_c_equality_expression, pp_c_logical_and_expression, pp_c_logical_or_expression): Mostly use pp_string and pp_c_ws_string in place of pp_identifier and pp_c_identifier for non-identifiers. Mark English strings for translation. * c-pretty-print.h (pp_c_ws_string): Declare. cp: * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id, pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression, pp_cxx_new_expression, pp_cxx_delete_expression, pp_cxx_unary_expression, pp_cxx_assignment_operator, pp_cxx_assignment_expression, pp_cxx_expression, pp_cxx_function_specifier, pp_cxx_decl_specifier_seq, pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq, pp_cxx_exception_specification, pp_cxx_direct_declarator, pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement, pp_cxx_namespace_alias_definition, pp_cxx_template_parameter, pp_cxx_canonical_template_parameter, pp_cxx_template_declaration, pp_cxx_declaration, pp_cxx_typeid_expression, pp_cxx_va_arg_expression, pp_cxx_offsetof_expression, pp_cxx_trait_expression): Mostly use pp_string and pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier for non-identifiers. Mark English strings for translation. * cxx-pretty-print.h (pp_cxx_ws_string): Define. * error.c (dump_template_parameter, dump_template_bindings, dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl, dump_decl, dump_template_decl, dump_function_decl, dump_parameters, dump_exception_spec, dump_template_parms, dump_expr, dump_binary_op, dump_unary_op, op_to_string, assop_to_string, args_to_string, cp_print_error_function, print_instantiation_full_context, print_instantiation_partial_context): Mostly use pp_string and pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier for non-identifiers. Mark English strings for translation. (dump_global_iord): Mark strings for translation; use longer strings instead of substituting single words. (function_category): Return a format string marked for translation, not a single word or phrase to substitute in a longer phrase. From-SVN: r147033
2007-11-01re PR c++/33494 (Broken diagnostic: 'modop_expr' not supported by dump_expr)Paolo Carlini1-2/+0
/cp 2007-10-31 Paolo Carlini <pcarlini@suse.de> PR c++/33494 * cxx-pretty-print.c (pp_cxx_typeid_expression, pp_cxx_delete_expression): Change to static linkage. * cxx-pretty-print.h: Adjust declarations. * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR, MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR, MODOP_EXPR): Forward to pp_expression. * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR): Fix typo. /testsuite 2007-10-31 Paolo Carlini <pcarlini@suse.de> PR c++/33494 * g++.dg/template/error35.C: New. From-SVN: r129815
2007-10-27re PR c++/33842 (Broken diagnostic: 'offsetof_expr' not supported by dump_expr)Jakub Jelinek1-0/+1
PR c++/33842 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype. * cxx-pretty-print.c (pp_cxx_primary_expression): Handle OFFSETOF_EXPR. (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New functions. * error.c (dump_expr): Handle OFFSETOF_EXPR. * g++.dg/template/error34.C: New test. From-SVN: r129677
2007-09-27re PR c++/33493 (Broken diagnostic: 'dl_expr' not supported by dump_expr)Paolo Carlini1-0/+1
/cp 2007-09-27 Paolo Carlini <pcarlini@suse.de> PR c++/33493 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR. * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing spaces in the formatting. * cxx-pretty-print.h (pp_cxx_delete_expression): Declare. /testsuite 2007-09-27 Paolo Carlini <pcarlini@suse.de> PR c++/33493 * g++.dg/template/error31.C: New. From-SVN: r128831
2007-09-18re PR c++/33462 (Broken diagnostic: 'va_arg_expr' not supported by dump_expr)Paolo Carlini1-0/+1
/cp 2007-09-18 Paolo Carlini <pcarlini@suse.de> PR c++/33462 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add. (pp_cxx_primary_expression): Use it. * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare. * error.c (dump_expr): Use it. /testsuite 2007-09-18 Paolo Carlini <pcarlini@suse.de> PR c++/33462 * g++.dg/ext/va-arg1.C: New. From-SVN: r128584
2007-09-18re PR c++/33463 (Broken diagnostic: 'typeid_expr' not supported by dump_expr)Paolo Carlini1-0/+1
/cp 2007-09-18 Paolo Carlini <pcarlini@suse.de> PR c++/33463 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split out case TYPEID_EXPR to... (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren and pp_cxx_right_paren. * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare. * error.c (dump_expr): Use it. /testsuite 2007-09-18 Paolo Carlini <pcarlini@suse.de> PR c++/33463 * g++.dg/rtti/typeid6.C: New. From-SVN: r128582
2007-09-18re PR c++/33464 (Broken diagnostic: 'trait_expr' not supported by dump_expr)Paolo Carlini1-1/+1
/cp 2007-09-18 Paolo Carlini <pcarlini@suse.de> PR c++/33464 * cxx-pretty-print.c (pp_cxx_trait_expression): Add. (pp_cxx_primary_expression): Use it. * cxx-pretty-print.h (pp_cxx_trait_expression): Declare. * error.c (dump_expr): Use it. /testsuite 2007-09-18 Paolo Carlini <pcarlini@suse.de> PR c++/33464 * g++.dg/ext/is_class_error.C: Rename to is_class_error1.C. * g++.dg/ext/is_class_error2.C: New. From-SVN: r128578
2007-08-02typeck.c: Change copyright header to refer to version 3 of the GNU General ↵Nick Clifton1-5/+4
Public... * typeck.c: Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page. * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c, config-lang.in, cp-tree.def, call.c, decl.h, ptree.c, Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c, cp-objcp-common.h, except.c, error.c, operators.def, cvt.c, tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c, cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c, cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c, name-lookup.h, parser.c: Likewise. From-SVN: r127154
2005-07-21call.c: Fix comment typo(s).Volker Reichelt1-1/+1
* call.c: Fix comment typo(s). * cxx-pretty-print.h: Likewise. * name-lookup.c: Likewise. * parser.c: Likewise. From-SVN: r102231
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101312
2005-06-15Canonicalize whitespace.Mike Stump1-15/+15
From-SVN: r100965
2005-06-14Remove extra white spacing at end of lines.Mike Stump1-1/+1
From-SVN: r100952
2005-02-08cxx-pretty-print.c, [...]: Update copyright.Kazu Hirata1-1/+1
* cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update copyright. From-SVN: r94736
2005-01-25cxx-pretty-print.c (pp_cxx_statement): Add prototype.Volker Reichelt1-2/+0
* cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static. (pp_cxx_function_definition): Make static. * cxx-pretty-print.h (pp_cxx_statement): Remove prototype. (pp_cxx_function_definition): Likewise. From-SVN: r94210
2004-05-31c-pretty-print.c (pp_c_left_bracket): Make a function.Gabriel Dos Reis1-0/+22
* c-pretty-print.c (pp_c_left_bracket): Make a function. (pp_c_right_bracket): Likewise. (pp_c_star): Likewise. (pp_c_ampersand): Define. * c-pretty-print.h (pp_c_left_bracket): Declare. (pp_c_right_bracket): Likewise. (pp_c_star): Likewise. (pp_c_ampersand): Likewise. cp/ * cxx-pretty-print.c (pp_cxx_colon_colon): Expor. (pp_cxx_begin_template_argument_list): Turn into a function. (pp_cxx_end_template_argument_list): Likewise. (pp_cxx_separate_with): Define. (pp_cxx_unqualified_id): Tidy. (pp_cxx_primary_expression): Likewise. (pp_cxx_postfix_expression): Likewise. (pp_cxx_expression): Likewise. (pp_cxx_simple_type_specifier): Likewise. (pp_cxx_type_specifier_seq): Likewise. (pp_cxx_parameter_declaration_clause): Likewise. (pp_cxx_exception_specification): Likewise. (pp_cxx_direct_declarator): Likewise. (pp_cxx_type_id): Likewise. * cxx-pretty-print.h (pp_cxx_whitespace): Export from cxx-pretty-print.c. (pp_cxx_left_paren): Likewise. (pp_cxx_right_paren): Likewise. (pp_cxx_left_brace): Likewise. (pp_cxx_right_brace): Likewise. (pp_cxx_left_bracket): Likewise. (pp_cxx_right_bracket): Likewise. (pp_cxx_dot): Likewise. (pp_cxx_identifier): Likewise. (pp_cxx_tree_identifier): Likewise. (pp_cxx_ampersand): New macro. (pp_cxx_star): Likewise. (pp_cxx_arrow): Likewise. (pp_cxx_semicolon): Likewise. (pp_cxx_complement): Likewise. (pp_cxx_begin_template_argument_list): Declaree. (pp_cxx_end_template_argument_list): Likewise. (pp_cxx_colon_colon): likewise. From-SVN: r82488
2004-03-24dwarf2asm.c, [...]: Update copyright.Kazu Hirata1-1/+1
gcc/ * dwarf2asm.c, loop.h, pretty-print.c, pretty-print.h, config/i386/mmintrin.h: Update copyright. cp/ * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c: Update copyright. From-SVN: r79938
2004-03-21pretty-print.c (pp_base_maybe_space): New function.Gabriel Dos Reis1-0/+3
* pretty-print.c (pp_base_maybe_space): New function. * pretty-print.h (pp_base_maybe_space): Declare. (pp_maybe_space): New macro. cp/ * error.c (enum pad): Remove. (dump_qualifiers): Likewise. (dump_type): Replace dump_qualifiers with * pp_cxx_cv_qualifier_seq. (dump_aggr_type): Likewise. (dump_type_suffix): Likewise. (dump_simple_decl): Likewise. (dump_function_decl): Likewise. (cv_to_string): Likewise. (dump_type_prefix): Likewise. Adjust return void. * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to cxx_pretty_print.h. (pp_cxx_template_keyword_if_needed): Document. (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy. (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and MUST_NOT_THROW_EXPR. testsuite/ * g++.dg/template/qualttp20.C: Adjust dg- regexp. From-SVN: r79796
2003-10-07re PR c++/10147 (Confusing error message for invalid template function argument)Mark Mitchell1-3/+1
PR c++/10147 * call.c (initialize_reference): Tweak error message. PR c++/12337 * init.c (build_new_1): Make sure that the expression returned is not an lvalue. PR c++/12344, c++/12236, c++/8656 * decl.c (start_function): Do not ignore attributes embedded in a function declarator. PR c++/12337 * g++.dg/init/new9.C: New test. PR c++/12334, c++/12236, c++/8656 * g++.dg/ext/attrib8.C: New test. From-SVN: r72183
2003-08-29re PR c++/11811 (Weird message with default template arguments)Gabriel Dos Reis1-0/+1
PR c++/11811 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New function. * cxx-pretty-print.h: Declare. * error.c (dump_template_parameter): Use it. (dump_type): Likewise. From-SVN: r70905
2003-08-25pretty-print.h (pp_maybe_newline_and_indent): New macro.Gabriel Dos Reis1-2/+4
* pretty-print.h (pp_maybe_newline_and_indent): New macro. * c-pretty-print.h (c_pretty_printer): Now typedef to the structure. Be consistent with pretty-print.h abd cxx-pretty-print.h (struct c_pretty_print_info): Document. Add new fields. (pp_type_specifier_seq): Rename from pp_c_type_specifier. (pp_direct_abstract_declarator): New macro. (pp_ptr_operator): Likewise. (pp_simple_type_specifier): Likewise. (pp_expression): Likewise. (pp_parameter_list): Rename from pp_parameter_declaration. * c-pretty-print.c (pp_c_whitespace): Now a function. (pp_c_left_paren): Likewise. (pp_c_right_paren): Likewise. (pp_c_dot): Likewise. (pp_c_ampersand): Likewise. (pp_c_arrow): Likewise. (pp_c_semicolon): Likewise. (pp_c_type_cast): New function. (pp_c_space_for_pointer_operator): Likewise. (pp_c_call_argument_list): Likewise. (pp_c_cv_qualifier): Adjust prototype. (pp_c_type_qualifier_list): Likewise. (pp_c_pointer): Likewise. Handle REFERENCE_TYPE here. (pp_c_type_specifier): Rename from pp_c_simple_type_specifier. Adjust to follow standard grammar. (pp_c_specifier_qualifier_list): Adjusr prototype. Handle REFERENCE_TYPE. Tidy. (pp_c_parameter_type_list): Adjust prototype. Tidy. (pp_c_parameter_declaration): Remove. (pp_c_abstract_declarator): Adjust prototype. (pp_c_direct_abstract_declarator): Likewise. (pp_c_type_id): Likewise. (pp_c_storage_class_specifier): Likewise. (pp_c_function_specifier): Likewise. (pp_c_declaration_specifiers): Likewise. (pp_c_direct_declarator): Likewise. (pp_c_declarator): Likewise. (pp_c_declarator): Likewise. (pp_c_declaration): Likewise. (pp_c_attributes): Likewise. Tidy. (pp_c_function_definition): Adjust prototype. (pp_c_char): Likewise. (pp_c_string_literal): Likewise. (pp_c_integer_constant): Likewise. (pp_c_character_constant): Likewise. (pp_c_bool_constant): Likewise. (pp_c_enumeration_constant): Likewise. (pp_c_floating_constant): Likewise. (pp_c_constant): Likewise. (pp_c_identifier): Likewise. (pp_c_primary_expression): Likewise. Remove TARGET_EXPR case. Tidy. (pp_c_initializer): Adjust prototype. (pp_c_init_declarator): Likewise. (pp_c_initializer_list): Likewise. (pp_c_id_expression): Likewise. (pp_c_postfix_expression): Likewise. (pp_c_expression_list): Likewise. (pp_c_unary_expression): Likewise. (pp_c_cast_expression): Likewise. (pp_c_multiplicative_expression): Likewise. (pp_c_additive_expression): Likewise. (pp_c_shift_expression): Likewise. (pp_c_relational_expression): Likewise. (pp_c_equality_expression): Likewise. (pp_c_and_expression): Likewise. (pp_c_exclusive_or_expression): Likewise. (pp_c_inclusive_or_expression): Likewise. (pp_c_logical_and_expression): Likewise. (pp_c_logical_or_expression): Likewise. (pp_c_conditional_expression): Likewise. (pp_c_assignment_expression): Likewise. (pp_c_expression): Likewise. Tidy. (pp_c_statement): Likewise. Document. (pp_c_pretty_printer_init): Adjust prototype. Tidy. * c-lang.c (c_initialize_diagnostics): Update. * c-common.h (strip_pointer_operator): Declare. * c-common.c (strip_pointer_operator): Define. cp/ * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag. (cxx_pretty_printer): Adjust base type. (pp_cxx_function_specifier): Declare. * cxx-pretty-print.c (pp_cxx_whitespace): New macro. (pp_cxx_left_paren): Likewise. (pp_cxx_right_paren): Likewise. (pp_cxx_dot): Likewise. (pp_cxx_arrow): Likewise. (pp_cxx_semicolon): Likewise. (pp_cxx_identifier): Likewise. (pp_cxx_cv_qualifier_seq): Likewise. (pp_cxx_storage_class_specifier): Likewise. (pp_cxx_expression_list): Likewise. (pp_cxx_space_for_pointer_operator): Likewise. (pp_cxx_init_declarator): Likewise. (pp_cxx_call_argument_list): Likewise. (pp_cxx_nonconsecutive_character): Tidy. (pp_cxx_conversion_function_id): New function. (pp_cxx_template_id): Likewise. (pp_cxx_class_name): Likewise. (pp_cxx_template_keyword_if_needed): Likewise. (pp_cxx_nested_name_specifier): Likewise. (pp_cxx_unqualified_id): Tidy (pp_cxx_qualified_id): Handle more nodes. (pp_cxx_primary_expression): Tidy. (pp_cxx_postfix_expression): Likewise. (pp_cxx_new_expression): Tidy. (pp_cxx_delete_expression): Likewise. (pp_cxx_cast_expression): New function. (pp_cxx_pm_expression): Tidy. (pp_cxx_conditional_expression): Likewise. (pp_cxx_assignment_operator): New function. (pp_cxx_assignment_expression): Tidy. (pp_cxx_expression): New function. (pp_cxx_function_specifier): Likewise. (pp_cxx_decl_specifier_seq): Likewise. (pp_cxx_simple_type_specifier): Tidy. (pp_cxx_type_specifier_seq): Likewise. (pp_cxx_ptr_operator): New function. (pp_cxx_implicit_parameter_type): Likewise. (pp_cxx_parameter_declaration): Tidy. (pp_cxx_parameter_declaration_clause): New function. (pp_cxx_exception_specification): Likewise. (pp_cxx_direct_declarator): Tidy. (pp_cxx_declarator): Likewise. (pp_cxx_ctor_initializer): New function. (pp_cxx_function_definition): Likewise. (pp_cxx_abstract_declarator): Tidy. (pp_cxx_direct_abstract_declarator): Likewise. (pp_cxx_type_id): Likewise. (pp_cxx_exception_declaration): New function. (pp_cxx_statement): Likewise. (pp_cxx_simple_declaration): Likewise. (pp_cxx_template_parameter_list): Likewise. (pp_cxx_template_parameter): Likewise. (pp_cxx_template_declaration): Likewise. (pp_cxx_explicit_specialization): Likewise. (pp_cxx_explicit_instantiation): Likewise. (pp_cxx_declaration): Tidy. (pp_cxx_pretty_printer_init): Initialize more fields. From-SVN: r70777
2003-08-10pretty-print.c (pp_base_indent): Rename from pp_indent.Gabriel Dos Reis1-1/+8
* pretty-print.c (pp_base_indent): Rename from pp_indent. * c-pretty-print.h (pp_c_pretty_print_flag)s: New datatype. (struct c_pretty_print_info): Add more fields. (pp_c_left_paren): Move to c-pretty-print.c. (pp_c_right_paren): Likewise. (pp_c_left_brace): Likewise. (pp_c_right_brace): Likewise. (pp_c_left_bracket): Likewise. (pp_c_right_bracket): Likewise. (pp_c_declarator): Declare. (pp_c_direct_declarator): Likewise. (pp_c_specifier_qualifier_list): Likewise. (pp_c_type_id): Likewise. * c-pretty-print.c (pp_c_cv_qualifier): Change prootype. Rework.. (pp_c_type_qualifier_list): New. (pp_c_pointer): Likewise. (pp_c_parameter_type_list): Likewise. (pp_c_function_definition): Likewise. (pp_c_id_expression): Likewise. (pp_c_simple_type_specifier): Tidy. (pp_c_unary_expression): Likewise. (pp_c_expression): Likewise. (pp_c_pretty_printer_init): Likewise. (pp_c_specifier_qualifier_list): Rework.. (pp_c_abstract_declarator): Likewise. (pp_c_postfix_expression): Likewise. (pp_c_primary_expression): Likewise. (pp_c_cast_expression): Likewise. (pp_c_direct_abstract_declarator): Likewise. (pp_c_storage_class_specifier): Likewise. (pp_c_function_specifier): Likewise. (pp_c_declaration_specifiers): Likewise. (pp_c_direct_declarator): Likewise. (pp_c_declarator): Likewise. (pp_c_declaration): Likewise. (pp_c_statement): Likewise. (pp_c_integer_constant): Rename from pp_c_integer_literal. (pp_c_character_constant): Rename from pp_c_character_literal. (pp_c_bool_constant): Rename from pp_c_bool_literal. (pp_c_enumeration_constant): Rename from pp_c_enumerator. (pp_c_floating_constant): Rename from pp_c_real_literal. (pp_c_constant): Rename from pp_c_literal. * c-lang.c: Include diagnostic.h and c-pretty-print.h (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. (c_initialize_diagnostics): New. * Makefile.in (c-lang.o): Update dependency. cp/ * error.c (dump_expr): Tidy. * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New. (pp_cxx_begin_template_argument_list): Likewise. (pp_cxx_end_template_argument_list): Likewise. (is_destructor_name): Likewise. (pp_cxx_unqualified_id): Likewise. (pp_cxx_qualified_id): Likewise. (pp_cxx_id_expression): Likewise. (pp_cxx_new_expression): Likewise. (pp_cxx_delete_expression): Likewise. (pp_cxx_pm_expression): Likewise. (pp_cxx_type_specifier): Rework. (pp_cxx_type_id): Likewise. (pp_cxx_primary_expression): Likewise. (pp_cxx_postfix_expression): Likewise. (pp_cxx_unary_expression): Likewise. (pp_cxx_multiplicative_expression): Likewise. (pp_cxx_conditional_expression): Likewise. (pp_cxx_assignment_expression): Likewise. (pp_cxx_pretty_printer_init): Tidy. From-SVN: r70299
2003-08-05pretty-print.h (pp_set_line_maximum_length): Make macro.Gabriel Dos Reis1-0/+44
* pretty-print.h (pp_set_line_maximum_length): Make macro. (pp_set_prefix): Likewise. (pp_destroy_prefix): Likewise. (pp_remaining_character_count_for_line): Likewise. (pp_clear_output_area): Likewise. (pp_formatted_text): Likewise. (pp_last_position_in_text): Likewise. (pp_emit_prefix): Likewise. (pp_append_text): Likewise. (pp_flush): Likewise. (pp_format_text): Likewise. (pp_format_verbatim): Likewise. (pp_tree_identifier): Tidy. * pretty-print.c (pp_base_format_text): Rename from pp_format_text. (pp_base_format_verbatim): Rename from pp_format_verbatim. (pp_base_flush): Rename from pp_flush. (pp_base_set_line_maximum_length): Rename from pp_set_line_maximum_length. (pp_base_clear_output_area): Rename from pp_clear_output_area. (pp_base_set_prefix): Rename from pp_set_prefix. (pp_base_destroy_prefix): Rename from pp_destroy_prefix. (pp_base_emit_prefix): Rename from pp_emit_prefix. (pp_base_append_text): Rename from pp_append_text. (pp_base_formatted_text): Rename from pp_formatted_text. (pp_base_last_position_in_text): Rename from pp_last_position_in_text. (pp_base_remaining_character_count_for_line): Rename from pp_remaining_character_count_for_line. * diagnostic.h (diagnostic_format_decoder): Tidy. (diagnostic_flush_buffer): Likewise. * c-pretty-print.h: (pp_c_string_literal): Declare. (pp_c_real_literal): Likewise. (pp_c_integer_literal): Likewise. * c-pretty-print.c (pp_c_char): Use pp_string in lieu of pp_identifier. (pp_c_character_literal): Tidy. (pp_c_string_literal): Make public. (pp_c_bool_literal): Likewise. (pp_c_integer_literal): Likewise. (pp_c_real_literal): Likewise. * Makefile.in (C_PRETTY_PRINT_H): New variable. (c-pretty-print.o): Update dependence. cp/ * cxx-pretty-print.h: New file. * cxx-pretty-print.c: Likewise. * error.c (scratch_pretty_printer): Change type. (init_error): Tidy. (dump_aggr_type): Likewise. (dump_global_iord): Likewise. (dump_expr): Likewise. (dump_char): Remove. * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. (cxx_initialize_diagnostics): New function. * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o (CXX_PRETTY_PRINT_H): New variable. (cp/cxx-pretty-print.o): New rule. (cp/cp-lang.o): Update dependence. (cp/error.o): Likewise. From-SVN: r70182