aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parse.in
AgeCommit message (Collapse)AuthorFilesLines
2003-05-21c-parse.in (fndef): Set DECL_SOURCE_LINE and FILE earlier.Nathan Sidwell1-28/+30
* c-parse.in (fndef): Set DECL_SOURCE_LINE and FILE earlier. (nested_function): Likewise. (notype_nested_function): Likewise. cp: * pt.c (register_specialization): Update the decl's location, if necessary. (check_explicit_specialization): Likewise. From-SVN: r67063
2003-05-21c-common.h (enum rid): Remove RID_BOUNDED, RID_UNBOUNDED.Nathan Sidwell1-6/+0
* c-common.h (enum rid): Remove RID_BOUNDED, RID_UNBOUNDED. * c-parse.in (reswords): Remove __bounded__ and __unbounded__. (rid_to_yy): Remove RID_BOUNDED, RID_UNBOUNDED slots. * print-tree.c (print_node): Remove ambient-boundedness. * tree.h (tree_common): Remove bounded_flag. (BOUNDED_INDIRECT_YPE_P, BOUNDED_POINTER_TYPE_P, BOUNDED_REFERENCE_TYPE_P, MAYBE_BOUNDED_INDIRECT_TYPE_P, MAYBE_BOUNDED_POINTER_TYPE_P, MAYBE_BOUNDED_REFERENCE_TYPE_P, TREE_BOUNDED, TYPE_MAIN_VARIANTS_PHYSICALLY_EQUAL_P, TYPE_MAIN_PHYSICAL_VARIANT, TYPE_BOUNDED, TYPE_QUAL_BOUNDED): Remove. (TYPE_QUALS): Remove BOUNDED. (TREE_EXPR_QUALS, TREE_FUNC_QUALS): Remove. (TYPE_BOUNDED_VALUE, TYPE_BOUNDED_BASE, TYPE_BOUNDED_EXTENT, TYPE_BOUNDED_SUBTYPE, TYPE_UNBOUNDED_VARIANT, TYPE_POINTER_DEPTH, TYPE_AMBIENT_BOUNDEDNESS, MAX_POINTER_DEPT, VA_LIST_POINTER_DEPTH): Remove. (struct tree_type): Remove pointer_depth. treelang: * treetree.c (reswords): Remove __bounded__, __unbounded__. From-SVN: r67058
2003-05-11re PR c/10675 (Compile time increases quadratically with struct size)Richard Henderson1-14/+26
PR c/10675 * c-decl.c: Include hashtab.h. (detect_field_duplicates): New. (finish_struct): Use it. * Makefile.in (c-decl.o): Update. * c-parse.in (structsp_attr): Nreverse component_decl_list results. (component_decl_list, component_decl_list2, components, components_notype): Build list in reverse order. (enumlist): Clarify docs. Use TREE_CHAIN not chainon. * tree.c (chainon): Special case op2 null as well. Reorg for clarity. From-SVN: r66710
2003-05-09c-parse.in (if_stmt_locus): New object.Gabriel Dos Reis1-7/+7
* c-parse.in (if_stmt_locus): New object. (if_prefix rule): Use it. Don't use warning_with_file_and_line. (select_or_iter_stmt rule): Likewise. (if_stmt_file): Remove. (if_stmt_line): Likewise. * jump.c: include "diagnostic.h" (never_reached_warning): Don't use warning_with_file_and_line. * Makefile.in (jump.o): Add dependce on diagnostic.h From-SVN: r66627
2003-05-01input.h (lineno): Rename to ...Nathan Sidwell1-7/+8
* input.h (lineno): Rename to ... (input_line): ... here. * tree.h (lineno): Rename to ... (input_line): ... here. * scan.h (lineno): Rename to ... (input_line): ... here. * toplev.c (lineno): Rename to ... (input_line): ... here. (push_srcloc, pop_srcloc): Rename lineno to input_line. * c-common.c (c_expand_start_cond, fname_decl): Likewise. * c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag, store_parm_decls, c_expand_body_1): Likewise. * c-errors.c (pedwarn_c99): Likewise. * c-format.c (status_warning): Likewise. * c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise. * c-opts.c (c_common_post_options, c_common_parse_file): Likewise. * c-parse.in (save_filename, maybe_type_qual, ifc): Likwise. * c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var, gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt, genrtl_return_stmt, genrtl_for_stmt, build_break_stmt, build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt, prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise. * coverage.c (create_coverage): Likewise. * diagnostic.c (pedwarn, sorry, error, fatal_error, internal_error, warning, diagnostic_report_current_module, inform): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (expand_inline_function, output_inline_function): Likewise. * rtl-error.c (file_and_line_for_asm): Likewise. * tree-inline.c (find_alloca_call, find_builtin_longjmp_call, walk_tree): Likewise. * tree.c (make_node): Likewise. * ada, cp, f, java, objc, treelang: Likewise. ada * trans.c (build_unit_elab, set_lineno): Rename lineno to input_line. * utils.c (pushdecl, create_label_decl, begin_subprog_body, end_subprog_body): Likewise. * utils2.c (build_call_raise): Likewise. cp * class.c (finish_struct): Rename lineno to input_line. * decl.c (push_binding_level, pop_binding_level, suspend_binding_level, resume_binding_level, make_label_decl, use_label, start_function): Likewise. * decl2.c (warn_if_unknown_interface, start_static_initialization_or_destruction, generate_ctor_or_dtor_function, finish_file): Likewise. * error.c (cp_line_of, print_instantiation_full_context, print_instantiation_context): Likewise. * except.c (check_handlers_1, check_handlers): Likewise. * init.c (create_temporary_var): Likewise. * method.c (use_thunk, synthesize_method): Likewise. * parser.c (cp_lexer_set_source_position_from_token, cp_lexer_get_preprocessor_token): Likewise. * pt.c (push_tinst_level, pop_tinst_level, tsubst_friend_function, instantiate_class_template, tsubst_decl, tsubst, tsubst_expr, instantiate_decl): Likewise. * semantics.c (genrtl_try_block, finish_label_stmt, begin_class_definition, expand_body, genrtl_finish_function): Likewise. * tree.c (build_min_nt, build_min): Likewise. f * ansify.c (die_unless): Rename lineno to input_line. * com.c (ffecom_subscript_check_, ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_, bison_rule_pushlevel_, bison_rule_compstmt_, finish_function, store_parm_decls): Likewise. * intrin.c (ffeintrin_fulfill_generic): Likewise. * lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_, ffelex_file_fixed, ffelex_file_free): Likewise. * std.c (ffestd_exec_end): Likewise. * ste.c (ffeste_emit_line_note_, ffeste_start_block_, ffeste_start_stmt_): Likewise. * ste.h (ffeste_filelinenum, ffeste_set_line): Likewise. java * lex.h (lineno): Rename to ... (input_line): ... here * parse-scan.y (lineno): Rename to ... (input_line): ... here. (reset_report): Rename lineno to input_line. * check-init.c (check_init): Likewise. * class.c (push_class): Likewise. * decl.c (complete_start_java_method, end_java_method): Likewise. * expr.c (expand_byte_code): Likewise. * jcf-parse.c (give_name_to_class, parse_class_file): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * lex.c (java_init_lex, java_allocate_new_line, do_java_lex): Likewise. * parse.h (YYNOT_TWICE): Likewise. * parse.y (empty_statement, expression_statement, java_pop_parser_context, java_parser_context_save_global, yyerror, register_fields, method_header, safe_layout_class, find_in_imports_on_demand, create_artificial_method, source_end_java_method, start_complete_expand_method, build_thisn_assign, java_complete_lhs, maybe_absorb_scoping_block): Likewise. objc * objc-act.c (objc_init): Rename lineno to input_line. (build_module_descriptor, build_selector_translation_table, build_protocol_template, build_method_prototype_list_template, build_category_template, build_selector_table, build_class_template, build_super_template, build_ivar_template, build_ivar_list_template, build_method_list_template, build_method_template, add_instance_variable): Likewise. treelang * tree1.c (treelang_init): Rename lineno to input_line. From-SVN: r66333
2003-01-28* c-parse.in: Remove '%expect 32' directive in objc modeGabriel Dos Reis1-3/+0
From-SVN: r61940
2003-01-10Merge from pch-branch.Geoffrey Keating1-4/+2
From-SVN: r61136
2002-12-28c-parse.in (yyprint): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX for correct format.Andreas Jaeger1-24/+10
* c-parse.in (yyprint): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX for correct format. From-SVN: r60570
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-0/+2
From-SVN: r60174
2002-08-15c-tree.h (skip_evaluation): Move declaration...Alexandre Oliva1-4/+8
* c-tree.h (skip_evaluation): Move declaration... * c-common.h: ... here. * c-typeck.c (build_external_ref): Don't assemble_external nor mark a tree as used if skip_evaluation is set. * c-parse.in (typeof): New non-terminal to set skip_evaluation around TYPEOF. (typespec_nonreserved_nonattr): Use it. From-SVN: r56358
2002-08-10c-common.c (flag_objc): New.Ziemowit Laski1-1/+1
2002-08-09 Ziemowit Laski <zlaski@apple.com> * c-common.c (flag_objc): New. * c-common.h (c_language_kind): Get rid of clk_objective_c enum value. (flag_objc): New extern declaration. * c-decl.c (implicitly_declare): Call objc_check_decl instead of maybe_objc_check_decl. (finish_decl): Likewise. (grokfield): Likewise. (finish_struct): Likewise. * c-lang.c (maybe_objc_check_decl): Rename to objc_check_decl. (maybe_objc_comptypes): Rename to objc_comptypes. (maybe_building_objc_message_expr): Rename to objc_message_selector. * c-lex.c (lex_charconst): Remove uses of clk_objective_c, replace with flag_objc as needed. * c-opts.c (c_common_init_options): Likewise. (c_common_decode_option): Likewise. * c-parse.in (init_reswords): Likewise. * c-tree.h (maybe_objc_check_decl): Rename to objc_check_decl. (maybe_objc_comptypes): Rename to objc_comptypes. (maybe_building_objc_message_expr): Rename to objc_message_selector. * c-typeck.c (comptypes): Call objc_comptypes instead of maybe_objc_comptypes, and/or objc_message_selector instead of (comp_target_types): Likewise. (convert_for_assignment): Likewise. (warn_for_assignment): Likewise. * cppinit.c (init_builtins): Set __OBJC__ manifest constant independently of those for other languages. * objc/objc-act.c (maybe_objc_comptypes): Delete. (maybe_objc_check_decl): Delete. (maybe_building_objc_message_expr): Rename to objc_message_selector. * objc/objc-lang.c (objc_init_options): Use clk_c instead of clk_objective_c; set flag_objc flag. From-SVN: r56173
2002-07-26c-common.h (RID_AND, [...]): Remove.Neil Booth1-13/+0
* c-common.h (RID_AND, RID_AND_EQ, RID_NOT, RID_NOT_EQ, RID_OR, RID_OR_EQ, RID_XOR, RID_XOR_EQ, RID_BITAND, RID_BITOR, RID_COMPL): Remove. * c-parse.in (rid_to_yy): Similarly. cp: * cp-tree.h (flag_operator_names): Remove. * decl2.c (flag_operator_names): Remove. (lang_f_options): Remove operator-names. * lex.c (D_OPNAME): Remove. (reswords): Remove operator names. (rid_to_yy): Remove operator names. (init_reswords): No need to handle D_OPNAME. * spew.c (read_process_identifier): There are no operator names. From-SVN: r55777
2002-07-16varargs.h: Replace with stub which issues #error.Zack Weinberg1-20/+0
* ginclude/varargs.h: Replace with stub which issues #error. * ginclude/stdarg.h: __builtin_stdarg_start is renamed __builtin_va_start. * builtins.def (BUILT_IN_VARARGS_START): Delete. (BUILT_IN_VA_START): New. * builtins.c (expand_builtin_va_start): Eliminate first argument and code to implement pre-ISO varargs. (std_expand_builtin_va_start): Ignore first argument; it is always 1. (expand_builtin): Handle BUILT_IN_VA_START and BUILT_IN_STDARG_START identically. Delete BUILT_IN_VARARGS_START case. * function.c (assign_parms): Delete hide_last_arg and all its uses. (mark_varargs): Delete function. * function.h (struct function): Delete 'varargs' bit. (current_function_varargs): Delete macro. * tree.h: Don't declare mark_varargs. * c-decl.c (c_function_varargs, c_mark_varargs): Delete. (c_expand_body): Don't call mark_varargs. * c-objc-common.c: Handle BUILT_IN_VA_START and BUILT_IN_STDARG_START identically. Delete BUILT_IN_VARARGS_START case. * c-tree.h: Don't declare c_mark_varargs. * c-parse.in: Remove grammar rules for '&...' (which has been commented out since before 2.7.2) and for '...' in K+R argument declarations. * builtins.c, function.c, integrate.c, sibcall.c, config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h, config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c, config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c, config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h, config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16.c: Delete all references to current_function_varargs, and code predicated on that flag. * config/alpha/alpha.c (alpha_va_start), config/arc/arc.c (arc_va_start), config/i386/i386.c (ix86_va_start), config/mips/mips.c (mips_va_start), config/mn10300/mn10300.c (mn10300_va_start), config/rs6000/rs6000.c (rs6000_va_start), config/s390/s390.c (s390_va_start), config/sh/sh.c (sh_va_start), Ignore first argument; it is always 1. * config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start. * config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c: Delete m68hc11_va_start. * config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h: No need to define EXPAND_BUILTIN_VA_START. * doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi, doc/trouble.texi: Remove references to GCC-provided <varargs.h>. testsuite: * c-torture/execute/991216-3.c, c-torture/execute/strct-varg-1.c, c-torture/execute/va-arg-7.c, c-torture/execute/va-arg-8.c, c-torture/execute/va-arg-15.c, c-torture/execute/va-arg-16.c, c-torture/execute/va-arg-17.c, c-torture/execute/va-arg-19.c: Convert to use <stdarg.h>. * c-torture/execute/va-arg-3.c, c-torture/execute/va-arg-3.x: Delete. * gcc.dg/va-arg-2.c: New. * lib/gcc.exp, lib/objc.exp: Remove code to set -DNO_VARARGS. From-SVN: r55472
2002-07-05copyright date updatedNathan Sidwell1-1/+1
From-SVN: r55260
2002-07-05c-parse.in (extdef): Append ';'.Nathan Sidwell1-0/+2
* c-parse.in (extdef): Append ';'. (old_style_parm_decls): Append ';'. From-SVN: r55258
2002-07-03c-parse.in (parsing_iso_function_signature): New variable.Kaveh R. Ghazi1-1/+23
gcc: * c-parse.in (parsing_iso_function_signature): New variable. (extdef_1): New, copied from... (extdef): ... here. Reset parsing_iso_function_signature. (old_style_parm_decls): Reset parsing_iso_function_signature. (old_style_parm_decls_1): New, copied from old_style_parm_decls. Warn about ISO C style function definitions. (nested_function, notype_nested_function): Reset parsing_iso_function_signature. (parmlist_2): Set parsing_iso_function_signature. * doc/invoke.texi (-Wtraditional): Document new behavior. gcc/testsuite: * gcc.dg/cpp/tr-warn2.c: Use traditional C style function definitions. * gcc.dg/wtr-aggr-init-1.c: Likewise. * gcc.dg/wtr-conversion-1.c: Likewise. * gcc.dg/wtr-escape-1.c: Likewise. * gcc.dg/wtr-int-type-1.c: Likewise. * gcc.dg/wtr-label-1.c: Likewise. * gcc.dg/wtr-static-1.c: Likewise. * gcc.dg/wtr-strcat-1.c: Likewise. * gcc.dg/wtr-suffix-1.c: Likewise. * gcc.dg/wtr-switch-1.c: Likewise. * gcc.dg/wtr-unary-plus-1.c: Likewise. * gcc.dg/wtr-union-init-1.c: Likewise. * gcc.dg/wtr-union-init-2.c: Likewise. * gcc.dg/wtr-union-init-3.c: Likewise. * gcc.dg/wtr-func-def-1.c: New test. From-SVN: r55201
2002-07-02c-parse.in (designator): Enable designated initializers if ObjC.Ziemowit Laski1-14/+3
2002-07-02 Ziemowit Laski <zlaski@apple.com> * c-parse.in (designator): Enable designated initializers if ObjC. (objcmessageexpr): Remove references to objc_receiver_context. * objc/objc-act.h (objc_receiver_context): Remove decl. * objc/objc-act.c (objc_receiver_context): Remove. (lookup_objc_ivar): Test objc_method_context instead of objc_receiver_context. 2002-07-02 Ziemowit Laski <zlaski@apple.com> * objc.dg/desig-init-1.m: New test. From-SVN: r55192
2002-06-20c-parse.in (initelt: identifier ':' initval): Add an empty action to fix a ↵Akim Demaille1-41/+44
type clash. 2002-06-19 Akim Demaille <akim@epita.fr> * c-parse.in (initelt: identifier ':' initval): Add an empty action to fix a type clash. (aliasdecl, classdef): Add the missing closing `;'. Whitespace changes. * gengtype-yacc.y (typedef_struct): Add an empty action to preevnt $$ = $1 type clashes. cp: * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with decl.h's TYPENAME. * spew.c, lex.c: Adjust. * parse.y (explicit_instantiation): Add empty action to override the default $$ = $1 where it introduces a type clash. From-SVN: r54811
2002-06-16c-common.c (flag_ms_extensions): Move from c++ front end.Richard Henderson1-9/+12
* c-common.c (flag_ms_extensions): Move from c++ front end. * c-common.h (flag_ms_extensions): Declare. * c-decl.c (c_decode_option): Add -fms-extensions. (grokfield): Don't accept anonymous structures in ISO C mode; accept only unnamed anonymous structures in GNU C mode; accept Plan 9 extensions in MS mode. * c-parse.in (SAVE_EXT_FLAGS, RESTORE_EXT_FLAGS): Rename from SAVE/RESTORE_WARN_FLAGS; add flag_iso frobbing; update all callers. (extension): Clear flag_iso. * doc/invoke.texi (C Dialect Options): Add -fms-extensions. * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common. * g++.dg/ext/anon-struct1.C: New. * g++.dg/ext/anon-struct2.C: New. * g++.dg/ext/anon-struct3.C: New. * gcc.dg/anon-struct-1.c: New. * gcc.dg/anon-struct-2.c: New. * gcc.dg/anon-struct-3.c: New. * gcc.dg/20011008-1.c: Adjust warning text. * gcc.dg/20020527-1.c: Add -fms-extensions. From-SVN: r54670
2002-06-04Merge from pch-branch up to tag pch-commit-20020603.Geoffrey Keating1-12/+7
From-SVN: r54232
2002-05-25Makefile.in (C_COMMON_H): Fix.Neil Booth1-23/+1
* Makefile.in (C_COMMON_H): Fix. Update other targets. * c-common.c: Don't include c-lex.h. (builtin_define_with_value): Make static and prototype. (builtin_define_std): Move from c-lex.h. * c-common.h (init_c_lex): Move from c-lex.h. * c-decl.c: Don't include c-lex.h. (make_pointer_declarator): Move from c-parse.in. * c-lex.c: Don't include c-lex.h. * c-lex.h: Remove. * c-parse.in: Don't include c-lex.h; include c-pragma.h. (make_pointer_declarator): Move to c-decl.c. * c-pragma.c: Don't include c-lex.h. * c-pragma.h (yydebug, YYDEBUG, parse_in, c_lex): Move from c-lex.h. * c-tree.h (make_pointer_declarator): New. cp: * lex.c: Don't include c-lex.h. * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h. doc: * passes.texi, tm.texi: Update. objc: * Make-lang.in: Update and correct. * objc-act.c: Don't include c-lex.h or cpplib.h. treelang: * treetree.c: Don't include c-lex.h. config: * darwin-c.c: Don't include c-lex.h. * c4x/c4x-c.c: Don't include c-lex.h. * c4x/t-c4x: Update. * i370/i370-c.c: Don't include c-lex.h. * i370/t-i370: Update. * i960/i960-c.c: Don't include c-lex.h. * i960/i960.c: Don't include cpplib.h, c-lex.h or c-pragma.h. * i960/t-960bare: Update. * i960/t-vxworks: Update. * rs6000/rs6000-c.c: Don't include c-lex.h; include c-pragma.h. * rs6000/t-darwin: Update. * rs6000/t-rs6000-c-rule: Update. * v850/v850-c.c: Don't include c-lex.h. * v850/v850.c: Don't include c-lex.h or cpplib.h. From-SVN: r53876
2002-05-21c-common.h (enum rid): Add RID_THREAD.Richard Henderson1-0/+2
* c-common.h (enum rid): Add RID_THREAD. * c-decl.c (start_decl): Do not set DECL_COMMON for tls variables. (grokdeclarator): Grok __thread. * c-parse.in (reswords): Add __thread. (rid_to_yy): Add RID_THREAD. * cp/lex.c (rid_to_yy): Add RID_THREAD. * tree.h (DECL_THREAD_LOCAL): New. (struct tree_decl): Add thread_local_flag. * print-tree.c (print_node): Dump DECL_THREAD_LOCAL. * tree.c (staticp): TLS variables are not static. * target-def.h (TARGET_HAVE_TLS): New. * target.h (have_tls): New. * output.h (SECTION_TLS): New. * varasm.c (assemble_variable): TLS variables can't be common for now. (default_section_type_flags): Handle .tdata and .tbss. (default_elf_asm_named_section): Handle SECTION_TLS. (categorize_decl_for_section): Handle DECL_THREAD_LOCAL. * flags.h (flag_tls_default): Declare. * toplev.c (flag_tls_default): Define. (display_help): Display help for it. (decode_f_option): Set it. * doc/extend.texi (Thread-Local): New node describing language-level thread-local storage. * doc/invoke.texi (-ftls-model): Document. * fixinc/inclhack.def (thread_keyword): New. * fixinc/fixincl.x: Rebuild. From-SVN: r53715
2002-04-26c-parse.in (malloced_yyss, [...]): New.Richard Henderson1-0/+55
* c-parse.in (malloced_yyss, malloced_yyvs): New. (yyoverflow): Re-add. Set them. (free_parser_stacks): New. * c-common.h: Declare it. * c-lex.c (c_common_parse_file): Call it. * parse.y (malloced_yyss, malloced_yyvs): New. (yyoverflow): Re-add. Set them. (free_parser_stacks): New. From-SVN: r52827
2002-04-26c-parse.in (yyoverflow): Revert.Richard Henderson1-35/+0
* c-parse.in (yyoverflow): Revert. * parse.y (yyoverflow): Revert. From-SVN: r52794
2002-04-26c-common.c (fix_string_type): Split out of ...Richard Henderson1-36/+71
* c-common.c (fix_string_type): Split out of ... (combine_strings): ... here. Take a varray, not a tree list. (c_expand_builtin_printf): Use fix_string_type. * c-common.h: Update decls. * c-parse.in (string): Remove. Update all uses to use STRING instead, and not call combine_strings. (yylexstring): New. (_yylex): Use it. * c-typeck.c (simple_asm_stmt): Don't call combine_strings. (build_asm_stmt): Likewise. * objc/objc-act.c (my_build_string): Use fix_string_type. (build_objc_string_object): Build varray for combine_strings. * parse.y (string): Remove. Update all uses to use STRING instead, and not call combine_strings. * rtti.c (tinfo_name): Use fix_string_type. * semantics.c (finish_asm_stmt): Don't call combine_strings. * spew.c (yylexstring): New. (read_token): Use it. * g++.dg/parse/concat1.C: New. * gcc.dg/concat2.c: New. From-SVN: r52790
2002-04-25c-parse.in (yyoverflow): New.Richard Henderson1-0/+35
* c-parse.in (yyoverflow): New. * cp/parse.y (yyoverflow): New. * g++.dg/parse/stack1.C: New. * gcc.dg/20020425-1.c: New. From-SVN: r52779
2002-04-25c-common.h (c_common_parse_file): Update.Neil Booth1-19/+1
* c-common.h (c_common_parse_file): Update. * c-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. * c-lex.c (YYDEBUG): Get from c-lex.h. (c_common_parse_file): Update. * c-lex.h (YYDEBUG, yydebug): New. * c-parse.in (YYDEBUG): Get from c-lex.h. (c_set_yydebug): Remove. * c-tree.h (c_set_yydebug): Remove. * langhooks-def.h (lhd_do_nothing_i): New. (lhd_set_yydebug, LANG_HOOKS_SET_YYDEBUG): Remove. (LANG_HOOKS_PARSE_FILE, LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_do_nothing_i): New. (lhd_set_yydebug): Remove. * langhooks.h (struct lang_hooks): Update. * toplev.c (set_yydebug): New. (compile_file): Update call to parse_file hook. (decode_d_option): Update. ada: * misc.c (gnat_parse_file): Update. cp: * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. * cp-tree.h (cxx_set_yydebug): Die. * lex.c (YYDEBUG): Get from c-lex.h. (cxx_set_yydebug): Remove. * parse.y: Include c-lex.h. (YYDEBUG): Get from c-lex.h. f: * com.h (ffe_parse_file): Update. * lex.c (ffe_parse_file): Update. java: * java-tree.h (java_parse_file): Update. (java_set_yydebug): Remove. * jcf-parse.c (yydebug): Remove. (java_set_yydebug): Die. (java_parse_file): Update. * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. objc: * objc-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. From-SVN: r52753
2002-04-16c-parse.in (poplevel, [...]): Add ending ';', in accordance with POSIX.Paolo Carlini1-1/+4
2002-04-16 Paolo Carlini <pcarlini@unitus.it> * c-parse.in (poplevel, compstmt_start, compstmt_primary_start): Add ending ';', in accordance with POSIX. From-SVN: r52376
2002-04-13stmt.c (check_unique_operand_names): Expect operand names to be strings ↵Richard Sandiford1-1/+3
rather than identifiers. * stmt.c (check_unique_operand_names): Expect operand names to be strings rather than identifiers. Use simple_cst_equal to compare them. (resolve_operand_name_1): Make same identifier to string change here. * c-parse.in (asm_operand): Convert a named operand into a string. * cp/parse.y (asm_operand): Likewise. From-SVN: r52269
2002-04-04c-common.c (truthvalue_conversion): Rename, update.Neil Booth1-11/+17
* c-common.c (truthvalue_conversion): Rename, update. * c-common.h (c_common_truthvalue_conversion): New. * c-convert.c (convert): Update. * c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * c-parse.in (expr_no_commas, if_prefix, select_or_iter_stmt): Update. * c-typeck.c (build_binary_op, build_unary_op, build_conditional_expr): Update. * fold-const.c (constant_boolean_node, fold): Use langhook. * langhooks-def.h (LANGHOOK_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook. * stmt.c (expand_decl_cleanup): Use langhook. * tree.h (truthvalue_conversion): Remove. ada: * gigi.h (truthvalue_conversion): Rename. * misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * trans.c (tree_transform): Update. * utils2.c (truthvalue_conversion): Rename, update. (build_binary_op, build_unary_op): Update. cp: * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * cvt.c: Update comment. * init.c (expand_cleanup_for_base): Update. * semantics.c (finish_parenthesized_expr): Update. * typeck.c (cp_truthvalue_conversion): Update. f: * com.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. (truthvalue_conversion): Rename. Update. Make static. (ffecom_truth_value): Update. java: * expr.c (truthvalue_conversion): Rename. Update. (expand_compare): Update. * java-tree.h (java_truthvalue_conversion): New. * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. objc: * objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. From-SVN: r51880
2002-03-28c-decl.c (finish_function): New arg can_defer_p.Richard Henderson1-5/+5
* c-decl.c (finish_function): New arg can_defer_p. Pass it on to c_expand_body. * c-tree.h (finish_function): Update decl. * c-objc-common.c, c-parse.in, objc/objc-act.c: Update calls. From-SVN: r51518
2002-03-17c-common.h (yyparse, [...]): New.Neil Booth1-3/+0
* c-common.h (yyparse, c_common_parse_file): New. * c-lang.c: Include c-common.h. (LANG_HOOKS_PARSE_FILE): Redefine. * c-lex.c: Include c-common.h. (yyparse): Rename c_common_parse_file. Call yyparse. * c-parse.in (yyparse): Remove macro. * c-tree.h (yyparse_1): Remove. * langhooks-def.h (LANG_HOOKS_PARSE_FILE): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hoooks): New hook parse_file. * toplev.c (compile_file): Use parse_file hook. * tree.h (yyparse): Remove. ada: * misc.c (LANG_HOOKS_PARSE_FILE): Redefine. (yyparse): Rename gnat_parse_file. cp: * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. * parse.y (yyparse): Remove macro. f: * com.c (LANG_HOOKS_PARSE_FILE): Redefine. * com.h (ffe_parse_file): New. * parse.c (NAME_OF_STDIN): Remove. (yyparse): Rename ffe_parse_file. java: * java-tree.h (java_parse_file): New. * jcf-parse.c (yyparse): Rename java_parse_file. * lang.c (LANG_HOOKS_PARSE_FILE): Redefine. objc: * objc-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. From-SVN: r50926
2002-02-28c-parse.in (STATIC): New terminal.Neil Booth1-45/+40
* c-parse.in (STATIC): New terminal. (scspec): New non-terminal. Update productions accordingly. (program): Remove bogus ifc / end ifc. (array_declarator): Simplify production using STATIC. From-SVN: r50155
2002-02-27c-common.c, [...]: Delete code implementing -traditional mode.Zack Weinberg1-13/+11
* c-common.c, c-common.h, c-decl.c, c-lex.c, c-parse.in, c-tree.h, c-typeck.c, cppexp.c, cpplex.c, cpplib.c, cpplib.h, cppmacro.c, objc/lang-specs.h, objc/objc-act.c, builtin-types.def, builtins.def, dwarf2out.c, dwarfout.c, gcc.c, toplev.c: Delete code implementing -traditional mode. * ada/misc.c, ch/ch-tree.h, ch/decl.c, cp/decl2.c, f/com.c, f/lex.c, f/top.c, java/builtins.c, java/decl.c: Delete traditional-mode-related code copied from the C front end but not used, or used only to permit the compiler to link. * doc/bugreport.texi, doc/cpp.texi, doc/extend.texi, doc/invoke.texi, doc/standards.texi, doc/trouble.texi: Document removal of -traditional mode for compilation, and remove documentation only relevant to that mode. * config/nextstep.h, config/ptx4.h, config/svr4.h, config/convex/convex.h, config/d30v/d30v.h, config/i386/dgux.h, config/i386/osf1elf.h, config/i386/osfelf.h, config/i386/osfrose.h, config/i386/sco5.h, config/i386/sol2.h, config/m68k/a-ux.h, config/m68k/hp310.h, config/m88k/dgux.h, config/m88k/dguxbcs.h, config/m88k/luna.h, config/m88k/m88k.c, config/m88k/m88k.h, config/m88k/openbsd.h, config/mips/abi64.h, config/mips/osfrose.h, config/mips/svr4-5.h, config/mips/svr4-t.h, config/sparc/sol2-sld-64.h, config/sparc/sol2.h, config/stormy16/stormy16.h: Remove all references to -traditional from target specs. Delete all mention of the no-longer-necessary TRADITIONAL_RETURN_FLOAT macro. Also delete a couple of commented-out definitions of DOLLARS_IN_IDENTIFIERS, with (incorrect) commentary referring to -traditional. * system.h: Poison TRADITIONAL_RETURN_FLOAT. * doc/tm.texi: Remove mention of TRADITIONAL_RETURN_FLOAT macro. * testsuite/gcc.c-torture/execute/920730-1t.c, testsuite/gcc.c-torture/execute/920730-1t.x, testsuite/gcc.dg/ext-glob.c: Delete test cases, only relevant to -traditional. From-SVN: r50110
2002-02-08c-common.c (c_expand_expr): Revert 2002-02-06 patch.Jakub Jelinek1-0/+1
* c-common.c (c_expand_expr): Revert 2002-02-06 patch. * c-parse.in (compstmt): Clear last_expr_type. * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr instead of compstmt. (compstmt_or_stmtexpr): Renamed from compstmt. (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type. * gcc.c-torture/execute/20020206-1.c: Test whether nesting 2 expression statements work instead. * gcc.dg/noncompile/20020207-1.c: New test. From-SVN: r49609
2002-01-24c-parse.in (parmlist_or_identifiers): Add maybe_attribute.Aldy Hernandez1-2/+11
2002-01-16 Aldy Hernandez <aldyh@redhat.com> * c-parse.in (parmlist_or_identifiers): Add maybe_attribute. (parmlist_or_identifiers_1): Verify that only a parmlist follows an attribute. * gcc.dg/20020115-1.c: New. From-SVN: r49161
2002-01-04c-common.c (c_expand_start_cond): Expect the IF_STMT node to be passed in, ↵Jeff Law1-7/+27
do not build it. * c-common.c (c_expand_start_cond): Expect the IF_STMT node to be passed in, do not build it. (c_begin_if_stmt): New function. (c_begin_while_stmt, c_finish_while_stmt_cond): Likewise. * c-common.h (c_expand_start_cond): Update prototype. (c_begin_if_stmt): Prototype new function. (c_begin_while_stmt, c_finish_while_stmt_cond): Likewise. * c-parse.in (if_prefix): Use c_begin_if_stmt, c_begin_while_stmt and c_finish_while_stmt_cond. From-SVN: r48539
2001-12-21c-parse.in (SAVE_WARN_FLAGS): Save warn_traditional.Richard Henderson1-8/+13
* c-parse.in (SAVE_WARN_FLAGS): Save warn_traditional. (RESTORE_WARN_FLAGS): Restore it. (extension): Zero warn_traditional. From-SVN: r48247
2001-12-15c-parse.in (typename): Do not split attributes.Aldy Hernandez1-7/+3
* c-parse.in (typename): Do not split attributes. Remove unsupported attributes warning. * c-decl.c (groktypename): Apply attributes. From-SVN: r48032
2001-12-11c-common.c (combine_strings): Complain if concatenating __FUNCTION__.Neil Booth1-0/+1
* c-common.c (combine_strings): Complain if concatenating __FUNCTION__. * c-parse.in (yylexname): Flag artificial strings. * tree.h (TREE_ARTIFICIAL_STRING_P): New. doc: * extend.texi: Update. testsuite: * gcc.dg/concat.c: New test. From-SVN: r47890
2001-12-10c-lex.c, [...]: Revert concatenation changes.Neil Booth1-35/+72
* c-lex.c, c-parse.in, c-typeck.c: Revert concatenation changes. cp: * parse.y, semantics.c: Similarly. From-SVN: r47848
2001-12-08c-common.h (rid): Add RID_CHOOSE_EXPR and RID_TYPES_COMPATIBLE_P.Aldy Hernandez1-1/+26
* c-common.h (rid): Add RID_CHOOSE_EXPR and RID_TYPES_COMPATIBLE_P. * c-parse.in (reswords): Add __builtin_choose_expr. Add __builtin_types_compatible_p. Add CHOOSE_EXPR token. Add TYPES_COMPATIBLE_P token. Add production for CHOOSE_EXPR. Add production for TYPES_COMPATIBLE_P. * doc/extend.texi (__builtin_choose_expr): Add documentation. (__builtin_types_compatible_p): Likewise. From-SVN: r47798
2001-12-08c-parse.in: Take string literals in assembler constructs, not expressions.Neil Booth1-13/+7
* c-parse.in: Take string literals in assembler constructs, not expressions. * c-typeck.c (build_asm_stmt, simple_asm_stmt): No need to check the strings are STRING_CSTs. From-SVN: r47795
2001-12-08c-lex.c (c_lex): Peek a token ahead for a string to concatenate...Neil Booth1-60/+29
* c-lex.c (c_lex): Peek a token ahead for a string to concatenate, using combine_strings to do the concatenation. * c-parse.in: Replace uses of the string non-terminal with STRING. Don't attempt string concatenation. (OBJC_STRING): New terminal. (string): Remove non-terminal. (_yylex): Call combine_strings on function names. Generate OBJC_STRING terminals; don't pass '@' on to yacc. * c-typeck.c (simple_asm_stmt): Don't concatenate strings here. (build_asm_stmt): Similarly. cp: * parse.y: Replace uses of the string non-terminal with STRING. Don't perform string concatentaion here. (string): Remove non-terminal. * semantics.c (finish_asm_stmt): Don't concatenate strings here. From-SVN: r47792
2001-12-04re PR c/4787 (Different anonymous variables declared but only one allocated ↵Joseph Myers1-18/+2
when the initialization is the same) * c-common.def (COMPOUND_LITERAL_EXPR): New. * c-common.c (c_expand_expr): Handle COMPOUND_LITERAL_EXPR. (c_staticp): New function. * c-common.h (COMPOUND_LITERAL_EXPR_DECL): New. (c_staticp): Declare. * c-typeck.c (default_function_array_conversion, build_unary_op): Don't handle CONSTRUCTOR specially. (lvalue_p, mark_addressable): Handle COMPOUND_LITERAL_EXPR. * c-decl.c (build_compound_literal): New function. * c-tree.h (build_compound_literal): Declare. * c-parse.in (primary): Use build_compound_literal. * c-lang.c (LANG_HOOKS_STATICP): Define. * objc/objc-lang.c (LANG_HOOKS_STATICP): Likewise. * doc/c-tree.texi: Document COMPOUND_LITERAL_EXPR. * doc/extend.texi: Update documentation of compound literals. Fixes PR c/4787. testsuite: * gcc.c-torture/execute/20000722-1.x, gcc.c-torture/execute/20010123-1.x: Remove. * gcc.c-torture/compile/init-3.c: Don't use a compound literal. * gcc.dg/c90-complit-1.c, gcc.dg/c99-complit-1.c, gcc.dg/c99-complit-2.c: New tests. From-SVN: r47629
2001-12-02c-decl.c (duplicate_decls, [...]): Remove leading capital from diagnostics.Neil Booth1-1/+1
* c-decl.c (duplicate_decls, push_parm_decl): Remove leading capital from diagnostics. * c-lex.c (cb_file_change): Similarly. * c-parse.in : Similarly. * cfgrtl.c (verify_flow_info): Similarly. * collect2.c: Similarly. * cppfiles.c (find_include_file): Similarly. * cppinit.c (cpp_handle_option): Similarly. * cpplex.c (cpp_spell_token): Similarly. * cppmain.c (do_preprocessing): Similarly. * gcc.c (translate_options, process_command, do_spec1, main, pfatal_execute): Similarly. * genattr.c (main): Similarly. * genattrtab.c (check_attr_test, operate_exp, simplify_test_exp, write_test_expr, main): Similarly. * gencodes.c (main): Similarly. * genconfig.c (main): Similarly. * genconstants.c (main): Similarly. * genemit.c (main): Similarly. * genextract.c (main): Similarly. * genflags.c (main): Similarly. * genopinit.c (main): Similarly. * genoutput.c (process_template, main): Similarly. * genpeep.c (main): Similarly. * genrecog.c (main): Similarly. * gensupport.c (is_predicable, identify_predicable_attribute, alter_predicate_for_insn, init_md_reader_args, main): Similarly. * ggc-page.c (alloc_anon): Similarly. * mips-tfile.c (add_string, add_procedure, add_file, read_line, parse_begin, parse_bend, parse_def, parse_end, parse_file, parse_stabs_common, parse_stabs, write_varray, write_object, read_seek, copy_object, main, error): Similarly. * profile.c (compute_branch_probabilities): Similarly. * reg-stack.c (check_asm_stack_operands): Similarly. * reload.c (find_reloads): Similarly. * reload1.c (spill_failure, failed_reload): Similarly. * rtl-error.c (_fatal_insn_not_found): Similarly. * toplev.c (read_integral_parameter, crash_signal, decode_f_option, set_target_switch, parse_options_and_default_flags) : Similarly. * tradcif.y (parse_number, yylex): Similarly. * tradcpp.c (main, fancy_abort): Similarly. * tree.c (tree_check_failed): Similarly. * varray.c (varray_check_failed): Similarly. * xcoffout.c (xcoff_output_standard_types): Similarly. cp: * call.c (build_java_interface_fn_ref): Similarly. * except.c (is_admissible_throw_operand): Similarly. * init.c (build_java_class_ref): Similarly. * xref.c (open_xref_file): Similarly. objc: * objc-act.c (get_object_ref, lookup_and_install_protocols, build_objc_string_object, objc_declare_alias, build_ivar_chain, finish_message_expr, build_protocol_expr, is_public, start_class): Similarly. testsuite: * objc.dg/alias.m: Update. * objc.dg/class-1.m: Update. * objc.dg/const-str-1.m: Update. * objc.dg/fwd-proto-1.m: Update. * objc.dg/id-1.m: Update. * objc.dg/super-class-1.m: Update. From-SVN: r47518
2001-12-01c-decl.c (duplicate_decls, [...]): Remove trailing period from diagnostics.Neil Booth1-1/+1
* c-decl.c (duplicate_decls, parmlist_tags_warning): Remove trailing period from diagnostics. * c-lex.c (cb_file_change): Similarly. * cppmacro.c (check_trad_stringification): Similarly. * gcc.c (do_spec_1): Similarly. * genattr.c (main): Similarly. * genattrtab.c (main, operate_exp, make_length_attrs): Similarly. * gencodes.c (main): Similarly. * genconfig.c (main): Similarly. * genconstants.c (main): Similarly. * genemit.c (main): Similarly. * genextract.c (main): Similarly. * genopinit.c (main): Similarly. * genoutput.c (main): Similarly. * genpeep.c (main): Similarly. * genrecog.c (main): Similarly. * mips-tfile.c (add_file, error): Similarly. * profile.c (init_branch_prob): Similarly. * reload1.c (spill_failure): Similarly. * stmt.c (parse_output_constraint): Similarly. * varasm.c (assemble_variable): Similarly. cp: * class.c (finish_struct): Similarly. * decl.c (check_tag_decl): Similarly. * lex.c (cxx_set_yydebug): Similarly. * typeck2.c (friendly_abort): Similarly. java: * expr.c (expand_byte_code): Similarly. * jcf-parse.c (load_class, jcf_parse): Similarly. * jcf-write.c (generate_classfile): Similarly. * lex.c (java_lex): Similarly. From-SVN: r47517
2001-11-18Makefile.in (c-parse.o, c-common.o): Update dependencies.Neil Booth1-9/+0
* Makefile.in (c-parse.o, c-common.o): Update dependencies. * c-common.c: Include diagnostic.h. (c_common_finish): New. * c-common.h (c_common_finish): New. * c-lang.c (LANG_HOOKS_FINISH): Override. * c-parse.in: Don't include diagnostic.h. (finish_parse): Remove. * langhooks.h: Update comments. * toplev.c (lang_dependent_init): New prototype. (finalize): New. (compile_file): Split cleanup code out to finalize. (lang_dependent_init): Stop if lang_hooks.init fails. (toplev_main): Update. * tree.h (finish_parse): Remove. ada: * misc.c (gnat_decode_option, gnat_init_options): Make definitions static too. (gnat_init): Don't return NULL. (finish_parse): Remove. cp: * lex.c (cxx_finish): Call c_common_finish. (finish_parse): Remove. f: * com.c (finish_parse): Remove. (ffe_finish): Move body of finish_parse. java: * lang.c (finish_parse): Rename to java_finish. (LANG_HOOKS_FINISH, java_finish): New. objc: * objc-act.c (LANG_HOOKS_FINISH): Override. From-SVN: r47141
2001-11-15c-common.c: Include c-lex.h.Neil Booth1-11/+2
* c-common.c: Include c-lex.h. (c_common_lang_init): Change prototype. Call init_c_lex and init_pragma from here. * c-common.h (c_common_lang_init): Change prototype. * c-decl.c (init_decl_processing): Rename. Call c_parse_init. * c-lang.c (c_init): Change prototype. Update. (c_init_options): Update. * c-lex.c (cpp_filename): Remove. (init_c_lex): Update. Read the main file, and get the original file name. (yyparse): Finish the command line options. * c-parse.in (c_parse_init): Call init_reswords here. (init_parse): Remove. * c-tree.h (c_init_decl_processing): New. * cpphash.c (_cpp_init_hashtable): After initializing the hash table, populate it. * cppinit.c (read_original_filename, cpp_finish_options): New. (cpp_create_reader): New prototype. Defer hash table initialization. (cpp_start_read): Rename cpp_read_main_file. Initialize the hash table. Get the original filename. * cpplib.h (cpp_create_reader): Update. (cpp_start_read): Remove. (cpp_read_main_file, cpp_finish_options): New. * cppmain.c (main, do_preprocessing): Update. * langhooks.h (struct langhooks): Update init prototype. * toplev.c (general_init, parse_options_and_default_flags, process_options, lang_indpendent_init, lang_dependent_init, init_asm_output): New; perform the bulk of initialization. (compile_file): Move most of initialization to above functions. (debug_hooks): Initialize statically. (set_Wunused): Relocate. (toplev_main): Move most of initialization to other init functions. Have a clear logic flow. * tree.h (init_parse, init_decl_processing): Remove. ada: * misc.c (gnat_init): Change prototype. Include the functionality of the old init_parse and init_decl_processing. (gnat_init_decl_processing): New prototype. (init_parse): Remove. * utils.c (init_decl_processing): Rename gnat_init_decl_processing. cp: * cp-tree.h (init_reswords, cxx_init_decl_processing): New. (cxx_init): Update prototype. * decl.c (init_decl_processing): Rename. Move null node init to its creation time. * lex.c (cxx_init_options): Update. (cxx_init): Combine with old init_parse; also call cxx_init_decl_processing. f: * com.c (ffecom_init_decl_processing): Renamed from init_decl_processing. (init_parse): Move contents to ffe_init. (ffe_init): Update prototype. java: * decl.c (init_decl_processing): Rename java_init_decl_processing. * java-tree.h: New prototype. * lang.c (java_init): Update prototype. Combine with old init_parse. objc: * objc-act.c (objc_init): Update prototype, combine with old init_parse. (objc_init_options): Update. From-SVN: r47046
2001-11-09Makefile.in: Update.Neil Booth1-1/+1
* Makefile.in: Update. * c-decl.c (print_lang_decl, print_lang_type): Remove. (print_lang_identifier): Rename c_print_identifier. * c-lang.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New. (print_lang_statistics, lang_print_xnode): Remove. * c-parse.in (set_yydebug): Rename c_set_yydebug. * c-tree.h (c_set_yydebug, c_print_identifier): New. * langhooks-def.h (lhd_print_tree_nothing, lhd_set_yydebug): New. LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New members. (lang_print_tree_hook): New. * langhooks.c (lhd_print_tree_nothing, lhd_set_yydebug): New. * print-tree.c: Include langhooks.h. (print_node): Update. * toplev.c (decode_d_option): Update. * tree.c: Include langhooks.h. (dump_tree_statistics): Update. * tree.h (print_lang_statistics, print_lang_decl, print_lang_type, print_lang_identifier, set_yydebug, lang_print_xnode): Remove. ada: * misc.c (gnat_print_decl, gnat_print_type): Renamed. (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE): Override. (print_lang_statistics, lang_print_xnode, print_lang_identifier, set_yydebug): Remove. cp: * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. * cp-tree.h (print_class_statistics): Remove. (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type, cxx_print_identifier, cxx_set_yydebug): New. * lex.c (set_yydebug): Rename c_set_yydebug. * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier, lang_print_xnode): Rename. * tree.c (print_lang_statistics): Rename. f: * com.c (ffe_print_identifier): Rename. (LANG_HOOKS_PRINT_IDENTIFIER): Override. (lang_print_xnode, print_lang_decl, print_lang_statistics, print_lang_type, set_yydebug): Remove. java: * java-tree.h (java_set_yydebug): New. * jcf-parse.c (set_yydebug): Rename java_set_yydebug. * lang.c (LANG_HOOKS_SET_YYDEBUG): Override. (print_lang_decl, print_lang_type, print_lang_identifier, print_lang_statistics, lang_print_xnode): Remove. objc: * objc-act.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. (lang_print_xnode, print_lang_statistics): Remove. From-SVN: r46907