summaryrefslogtreecommitdiff
path: root/gcc/c-lang.c
Commit message (Collapse)AuthorAgeFilesLines
* gcc/ChangeLog:steven2010-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160330 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic-core.h: New. Contents moved from diagnostic.h andjsm282010-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | toplev.h. * diagnostic.c: Don't include toplev.h. (progname): Define. Moved from toplev.c. (seen_error): New function. * diagnostic.h: Include diagnostic-core.h. (diagnostic_t, emit_diagnostic): Don't declare here. * toplev.c (progname): Move to toplev.c. (emit_debug_global_declarations, compile_file, finalize, do_compile, toplev_main): Use seen_error. * toplev.h: Include diagnostic-core.h. (trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG, internal_error, warning, warning_at, error, error_n, error_at, fatal_error, pedwarn, permerror, sorry, inform, inform_n, verbatim, fnotice, progname): Move to diagnostic-core.h. * builtins.c: Include diagnostic-core.h instead of diagnostic.h. (expand_builtin_expect): Use seen_error. * c-decl.c: Include diagnostic-core.h instead of diagnostic.h. (c_make_fname_decl, c_write_global_declarations): Use seen_error. * c-format.c: Include diagnostic-core.h instead of diagnostic.h. * c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h. * c-lang.c: Include diagnostic-core.h instead of diagnostic.h. * c-lex.c (c_lex_with_flags, interpret_float): Don't increment errorcount for errors. * c-opts.c (c_common_finish): Use seen_error. * cgraph.c: Include diagnostic-core.h instead of diagnostic.h. * cgraphunit.c (verify_cgraph_node, verify_cgraph, cgraph_output_pending_asms, cgraph_optimize): Use seen_error. * coverage.c: Include diagnostic-core.h instead of diagnostic.h. (get_coverage_counts): Use seen_error. * dwarf2out.c (dwarf2out_finish): Use seen_error. * gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup, gimplify_body): Use seen_error. * ipa-inline.c (cgraph_early_inlining): Use seen_error. * ipa-pure-const.c (gate_pure_const): Use seen_error. * ipa-reference.c (gate_reference): Use seen_error. * jump.c: Include diagnostic-core.h instead of diagnostic.h. * lambda-code.c: Include diagnostic-core.h instead of diagnostic.h. * lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h. * lto-compress.c: Include diagnostic-core.h instead of diagnostic.h. * lto-section-in.c: Include diagnostic-core.h instead of diagnostic.h. * lto-streamer-out.c: Include diagnostic-core.h instead of diagnostic.h. * lto-streamer.c: Include diagnostic-core.h instead of diagnostic.h. (gate_lto_out): Use seen_error. * matrix-reorg.c: Include diagnostic-core.h instead of diagnostic.h. * omega.c: Include diagnostic-core.h instead of diagnostic.h. * omp-low.c: Include diagnostic-core.h instead of diagnostic.h. (gate_expand_omp, lower_omp_1): Use seen_error. * passes.c: Include diagnostic-core.h instead of diagnostic.h. (rest_of_decl_compilation, rest_of_type_compilation, gate_rest_of_compilation, ipa_write_summaries): Use seen_error. * tree-cfg.c (label_to_block_fn): Use seen_error. * tree-inline.c (optimize_inline_calls): Use seen_error. * tree-mudflap.c (mudflap_finish_file): Use seen_error. * tree-optimize.c (gate_all_optimizations, gate_all_early_local_passes, gate_all_early_optimizations): Use seen_error. * tree-ssa-structalias.c (gate_ipa_pta): Use seen_error. * varpool.c: Include diagnostic-core.h instead of diagnostic.h. (varpool_remove_unreferenced_decls, varpool_assemble_pending_decls): Use seen_error. * Makefile.in (DIAGNOSTIC_CORE_H): Define. (TOPLEV_H, DIAGNOSTIC_H): Update. (c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o, lto-streamer-out.o, lto-section-in.o, lto-streamer.o, c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o, builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o, coverage.o, lambda-code.o): Update dependencies. cp: * call.c: Include diagnostic-core.h instead of diagnostic.h. * cp-lang.c: Don't include diagnostic.h * name-lookup.c: Include diagnostic-core.h instead of diagnostic.h. (cp_emit_debug_info_for_using): Use seen_error. * optimize.c: Include diagnostic-core.h instead of diagnostic.h. * parser.c: Include diagnostic-core.h instead of diagnostic.h. * pt.c (iterative_hash_template_arg): Use seen_error. * repo.c: Include diagnostic-core.h instead of diagnostic.h. * typeck2.c: Include diagnostic-core.h instead of diagnostic.h. * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o, cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update dependencies. lto: * lto.c: Include diagnostic-core.h instead of diagnostic.h. (read_cgraph_and_symbols, lto_main): Use seen_error. * Make-lang.in (lto/lto.o): Update dependencies. objc: * objc-act.c: Include diagnostic-core.h instead of diagnostic.h. * Make-lang.in (objc/objc-act.o): Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159947 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/ChangeLogsteven2010-05-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vecir.h: New file with VEC primitives for tree, gimple, and rtl. * Makefile.in: Add it. Fix all other Makefile dependencies for changes below. * tree.h: Include it instead of defining VEC primitives here. * gimple.h: Likewise. * rtl.h: Likewise. * tree-inline.h: Inlclude vecir.h instead of gimple.h. * except.h: Include vecir.h, break dependence on tree.h. * gimplify.c (append_to_statement_list_1, append_to_statement_list): Move from here... * tree-iterator.c: ...to here. * tree-iterator.h: Fix file introduction comment. Add extern markers. * c-lex.c: Include fixed-value.h instead of rtl.h. Do not include tm_p.h. * c-cppbuiltin.c: Explain why debug.h and tm_p.h are included. * c-objc-common.h: Do not include tm.h, rtl.h, insn-config.h, integrate.h, function.h, toplev.h, tree-inline.h, ggc.h, tree-mudflap.h, and target.h. * c-semantics.c: Do not include except.h, ggc.h, rtl.h, timevar.h, predict.h, tree-inline.h, gimple.h, and langhooks.h. * c-decl.c: Do not include expr.h, ggc.h, libfuncs.h, except.h. Add FIXME for why gimple.h is still included (should be unnecessary since GCC 4.5 gimplification unit-at-a-time). * c-typeck.c: Do not include rtl.h, tm_p.h, ggc.h, and gimple.h. * c-pragma.c: Add FIXME for why function.h needs to be included just for cfun, at front-end level. Add note that REGISTER_TARGET_PRAGMAS should probably be a target hook. Do not include ggc.h, but include vecprim.h for VEC(char). * c-opts.c: Do not include tm.h, tree-inline.h, and tm_p.h. Explain why target.h is included. * c-omp.h: Do not include tm.h, function.h, and bitmap.h. Explain why gimple.h is included. * c-ppoutput.c: Do not include tm.h. * c-common.c: Do not include gimple.h. Explain why expr.h is included. * c-parses.c: Explain why rtl.h is included, and that this (and only this) is also why tm.h must be included. Do not include except.h. * c-lang.c: Do not include ggc.h. cp/ChangeLog * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes. * Make-lang.in: Fix dependencies accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159442 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-09-01 Diego Novillo <dnovillo@google.com>dnovillo2009-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-lang.c (lang_hooks): Remove const qualifier. java/ChangeLog * lang.c (lang_hooks): Remove const qualifier. objc/ChangeLog * objc-lang.c (lang_hooks): Remove const qualifier. objcp/ChangeLog * objcp-lang.c (lang_hooks): Remove const qualifier. ada/ChangeLog * gcc-interface/misc.c (lang_hooks): Remove const qualifier. fortran/ChangeLog * f95-lang.c (lang_hooks): Remove const qualifier. cp/ChangeLog * cp-lang.c (lang_hooks): Remove const qualifier. 2009-09-01 Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_node_for_decl): New. * cgraph.h (cgraph_node_for_decl): Declare. * tree.c (host_integerp): Return 0 if T is NULL. 2009-09-01 Diego Novillo <dnovillo@google.com> * tree.h (struct alias_pair): Move from varasm.c. (alias_pairs): Likewise. (TYPE_MAXVAL): Define. (TYPE_MINVAL): Define. (iterative_hash_host_wide_int): Declare. (remove_unreachable_alias_pairs): Declare. * tree-pass.h (pass_ipa_free_lang_data): Declare. * diagnostic.c (default_diagnostic_starter): Make extern. (default_diagnostic_finalizer): Make extern. * diagnostic.h (default_diagnostic_starter): Declare. (default_diagnostic_finalizer): Declare. (default_tree_printer): Declare. * toplev.c (default_tree_printer): Make extern. 2009-09-01 Richard Guenther <rguenther@suse.de> Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_add_new_function): Remove gimplification. * cgraphunit.c (cgraph_expand_function): Do not emit associated thunks from here. (cgraph_emit_thunks): New. (cgraph_optimize): Call it. Return if any IPA pass finds an error. * varasm.c (finish_aliases_1): Ignore errorneous aliases used by thunks. 2009-09-01 Simon Baldwin <simonb@google.com> Rafael Espindola <espindola@google.com> Richard Guenther <rguenther@suse.de> Doug Kwan <dougkwan@google.com> Diego Novillo <dnovillo@google.com> * tree.c: Include tree-pass.h, langhooks-def.h, diagnostic.h, cgraph.h, timevar.h, except.h and debug.h. (free_lang_data_in_type): New. (need_assembler_name_p): New. (free_lang_data_in_block): New. (free_lang_data_in_decl): New. (struct free_lang_data_d): New. (add_tree_to_fld_list): New. (find_decls_types_r): New. (get_eh_types_for_runtime): New. (find_decls_types_in_eh_region): New. (find_decls_types_in_node): New. (find_decls_types_in_var): New. (free_lang_data_in_cgraph): New. (free_lang_data): New. (gate_free_lang_data): New. (pass_ipa_free_lang_data): New. 2009-09-01 Diego Novillo <dnovillo@google.com> * timevar.def (TV_IPA_FREE_LANG_DATA): Define. * langhooks.h (struct lang_hooks): Add field free_lang_data. (lang_hooks): Remove const qualifier. * ipa.c (cgraph_remove_unreachable_nodes): Call remove_unreachable_alias_pairs. * except.c (add_type_for_runtime): Check if TYPE has already been converted. (lookup_type_for_runtime): Likewise. (check_handled): Handle converted types. * varasm.c (remove_unreachable_alias_pairs): New. * gimple.c: Include demangle.h. (gimple_decl_printable_name): New. (gimple_fold_obj_type_ref): New. * gimple.h (gimple_decl_printable_name): Declare. (gimple_fold_obj_type_ref): Declare. * passes.c (init_optimization_passes): Add pass pass_ipa_free_lang_data. * langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA. testsuite/ChangeLog 2009-09-01 Diego Novillo <dnovillo@google.com> * gcc.dg/gomp/combined-1.c: Adjust expected pattern. * g++.dg/tree-prof/inline_mismatch_args.C: Likewise. * g++.dg/warn/unit-1.C: Likewise. * g++.dg/ipa/iinline-1.C: Likewise. * g++.dg/template/cond2.C: Adjust expected line location for the error. * g++.dg/template/pr35240.C: Likewise. cp/ChangeLog 2009-09-01 Doug Kwan <dougkwan@google.com> * tree.c (cp_fix_function_decl_p): New. (cp_free_lang_data): New. 2009-09-01 Diego Novillo <dnovillo@google.com> * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H). * decl2.c: Include pointer-set.h. (collect_candidates_for_java_method_aliases): New. (cp_write_global_declarations): Call it. Add local variable CANDIDATES. If set, call build_java_method_aliases. (build_java_method_aliases): Add argument CANDIDATES. Use it to determine if FNDECL should get a hidden alias. * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define. * cp-tree.h (cp_free_lang_data): Declare. 2009-09-03 Richard Guenther <rguenther@suse.de> * method.c (use_thunk): Use cgraph_finalize_function to hand off thunks to the cgraph. * semantics.c (emit_associated_thunks): Do not emit thunks for really extern functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151360 138bc75d-0d04-0410-961f-82ee72b054a4
* Update Copyright years for files modified in 2008 and/or 2009.jakub2009-02-201-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144324 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h (enum tree_code): Include all-tree.def, not tree.def.ian2008-06-211-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define END_OF_BASE_TREE_CODES around inclusion. * tree.c (tree_code_type): New global array. (tree_code_length, tree_code_name): Likewise. * Makefile.in (TREE_H): Add all-tree.def, c-common.def, and $(lang_tree_files). (all-tree.def, s-alltree): New targets. (gencheck.h, s-gencheck): Remove. (tree.o): Depend upon all-tree.def. (build/gencheck.o): Remove gencheck.h dependency. (mostlyclean): Don't remove gencheck.h. * c-common.h (enum c_tree_code): Remove. * c-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * gencheck.c (tree_codes): Include all-tree.def, rather than tree.def, c-common.def, and gencheck.h. Undefined DEFTREECODE after it is used. * tree-browser.c (tb_tree_codes): Include all-tree.def, rather than tree.def. * cp/cp-tree.h (enum cplus_tree_code): Remove. (operator_name_info): Size to MAX_TREE_CODES. (assignment_operator_name_info): Likewise. * cp/cp-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * cp/lex.c (operator_name_info): Size to MAX_TREE_CODES. (assignment_operator_name_info): Likewise. * cp/decl.c (grok_op_properties): Change LAST_CPLUS_TREE_CODE to MAX_TREE_CODES. * cp/mangle.c (write_expression): Likewise. * cp/Make-lang.in (CXX_TREE_H): Remove cp/cp-tree.def. * fortran/f95-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * java/java-tree.h (enum java_tree_code): Remove. * java/lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * java/Make-lang.in (JAVA_TREE_H): Remove java/java-tree.def. * objc/objc-act.h (enum objc_tree_code): Remove. * objc/objc-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * objcp/objcp-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * ada/ada-tree.h (enum gnat_tree_code): Remove. * ada/Make-lang.in (ADA_TREE_H): Remove ada/ada-tre.def. * ada/misc.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137006 138bc75d-0d04-0410-961f-82ee72b054a4
* Change copyright header to refer to version 3 of the GNU General Public ↵nickc2007-07-261-5/+4
| | | | | | License and to point readers at the COPYING3 file and the FSF's license web page. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126948 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:zack2005-06-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pretty-print.h (PP_NL_ARGMAX): New. (text_info): Add locus. (struct chunk_info): New. (output_buffer): Add formatted_obstack, chunk_obstack, and cur_chunk_array. Change obstack to a pointer. (pp_wrapping_mode_t, pp_wrapping_mode, pp_set_verbatim_wrapping): New. (struct pretty_print_info): Replace ideal_maximum_length and prefixing_rule with wrapping. (pp_line_cutoff, pp_prefixing_rule): Update to match. Update prototypes and wrapper macros throughout. * pretty-print.c (pp_formatted_text_data, pp_append_r) (pp_base_clear_output_area, pp_construct, pp_base_formatted_text) (pp_base_last_position_in_text, pp_base_newline, pp_base_character): Update for changes to pp structure. (pp_base_prepare_to_format, pp_base_format_text): Delete. (pp_base_format, pp_base_output_formatted_text): New functions. (pp_base_format_verbatim): Use pp_set_verbatim_wrapping. (pp_verbatim): Clear text.locus. (pp_printf): Likewise. Use pp_format and pp_output_formatted_text. * c-objc-common.c (c_tree_printer): Update function signature. * diagnostic.c (diagnostic_initialize): Update for changes to pp structure. (diagnostic_report_diagnostic): Call pp_format and then pp_output_formatted_text. (verbatim): Clear text.locus. * diagnostic.h (diagnostic_prefixing_rule, diagnostic_line_cutoff): Update for changes to pp structure. * c-lang.c: No need to include c-pretty-print.h. * Makefile.in: Remove bogus line containing only a tab. (c-lang.o): Update dependencies. * toplev.c (announce_function): Don't use verbatim. (default_tree_printer): Update signature. * objc/objc-lang.c: No need to include c-pretty-print.h. * objc/Make-lang.in: Update dependencies. gcc/cp: * cp-lang.c: No need to include cxx-pretty-print.h. * error.c (cp_printer): Update signature. No need to process flags. (print_instantiation_partial_context): Output last newline with pp_base_newline. * Make-lang.in: Update dependencies. gcc/objcp: * objcp-lang.c: No need to include cxx-pretty-print.h. * Make-lang.in: Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101481 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kcook2005-06-251-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101317 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h, c-common.c, c-cppbuiltin.c, c-lang.c,kazu2005-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | c-tree.h, cfgbuild.c, cgraph.c, cgraph.h, collect2.c, combine.c, config.gcc, coverage.h, cse.c, cselib.c, defaults.h, df.c, dwarf2asm.c, dwarf2out.c, explow.c, expr.c, flow.c, fold-const.c, gcse.c, ggc-page.c, gimple-low.c, gimplify.c, ifcvt.c, langhooks-def.h, lcm.c, optabs.h, output.h, postreload-gcse.c, postreload.c, recog.c, resource.c, rtl.def, rtlanal.c, sched-deps.c, sched-rgn.c, targhooks.h, toplev.c, tree-data-ref.c, tree-eh.c, tree-flow.h, tree-loop-linear.c, tree-mudflap.h, tree-nrv.c, tree-optimize.c, tree-outof-ssa.c, tree-pass.h, tree-scalar-evolution.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dse.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa.c, tree-vectorizer.c, tree.def, unwind-dw2-fde-darwin.c, var-tracking.c: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93827 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/19031rth2005-01-021-1/+0
| | | | | | | | | | | | | | | | * c-decl.c (pop_file_scope): Call maybe_apply_pending_pragma_weaks. * c-lang.c (finish_file): Don't do it here. * objc/objc-act.c (objc_finish_file): Likewise. * cgraph.c (decl_assembler_name_equal): New. (cgraph_node_for_asm, cgraph_varpool_node_for_asm): New. (cgraph_varpool_node): Actually link up cgraph_varpool_nodes. * cgraph.h (struct cgraph_varpool_node): Add next. (cgraph_node_for_asm, cgraph_varpool_node_for_asm): Declare. * varasm.c (assemble_alias): Mark the target as needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92803 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>jsm282004-11-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c/7544 * Makefile.in (c-lang.o): Update dependencies. * c-lang.c: Include "c-pragma.h". (finish_file): Call maybe_apply_pending_pragma_weaks. * c-pragma.c (maybe_apply_pending_pragma_weaks): New function. * c-pragma.h (maybe_apply_pending_pragma_weaks): New prototype. cp: 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com> * Make-lang.in (cp/decl2.o): Update dependencies. * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks. objc: 2004-11-29 Joseph Myers <joseph@codesourcery.com> * Make-lang.in (objc/objc-act.o): Update dependencies. * objc-act.c (objc_finish_file): Call maybe_apply_pending_pragma_weaks if not OBJCPLUS. testsuite: 2004-11-29 Joseph Myers <joseph@codesourcery.com> * g++.dg/ext/weak1.C, gcc.dg/weak/weak-10.c, objc.dg/weak-1.m: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91479 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/ChangeLog]zlaski2004-11-021-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | 2004-11-02 Ziemowit Laski <zlaski@apple.com> * c-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove. (c_types_compatible_p): Move function definition... * c-objc-common.c (c_types_compatible_p): ...here. * c-objc-common.h (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from c-lang.c. [gcc/cp/ChangeLog] 2004-11-02 Ziemowit Laski <zlaski@apple.com> * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition. (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h. * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here from cp-lang.c. * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here from cp-lang.c. (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89997 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>zack2004-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zack Weinberg <zack@codesourcery.com> * alias.c (find_base_decl): Remove unreachable case '3' block. * expr.c (safe_from_p): Abort if passed a type. * tree-gimple.c (recalculate_side_effects): Abort if passed anything other than an expression. * tree-ssa-pre.c (phi_translate): Return expr immediately if is_gimple_min_invariant is true for it. Reorder cases for clarity. Abort on un-handled tree classes. (valid_in_set): Likewise. * tree.c (tree_code_class_strings): New static data. * tree.h (enum tree_code_class): New. (tree_code_class_strings): Declare. (TREE_CODE_CLASS_STRING, EXCEPTIONAL_CLASS_P, CONSTANT_CLASS_P) (REFERENCE_CLASS_P, COMPARISON_CLASS_P, UNARY_CLASS_P, BINARY_CLASS_P) (STATEMENT_CLASS_P, EXPRESSION_CLASS_P, IS_TYPE_OR_DECL_P): New macros. (TYPE_P, DECL_P, IS_NON_TYPE_CODE_CLASS, IS_EXPR_CODE_CLASS) (checking macros, EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_LOCUS): Update. * tree.def, c-common.def, objc/objc-tree.def: Use tree_code_class enumeration constants instead of code letters. * alias.c, builtins.c, c-common.c, c-format.c, c-lang.c, c-pragma.c * c-typeck.c, cgraphunit.c, convert.c, dbxout.c, dwarf2out.c * emit-rtl.c expr.c, fold-const.c, gimplify.c, lambda-code.c * langhooks.c, langhooks.h, predict.c, print-tree.c, reload1.c, stmt.c * tree-browser.c, tree-cfg.c, tree-chrec.c, tree-complex.c, tree-dfa.c * tree-dump.c, tree-eh.c, tree-gimple.c, tree-inline.c, tree-nested.c * tree-outof-ssa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-ccp.c * tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-forwprop.c, tree-ssa-live.c * tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c * tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-propagate.c * tree-ssa.c, tree-ssanames.c, tree-tailcall.c, tree.c, varasm.c * config/sol2-c.c, config/arm/arm.c, config/i386/winnt.c * config/pa/pa.c, config/pa/pa.h, config/sh/sh.c, objc/objc-lang.c Update to match. * LANGUAGES: Add note about change. ada: * ada-tree.def: Use tree_code_class enumeration constants instead of code letters. * ada-tree.h, decl.c, misc.c, trans.c, utils.c, utils2.c: Update for new tree-class enumeration constants. cp: * cp-tree.def: Use tree_code_class enumeration constants instead of code letters. * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c * mangle.c, pt.c, semantics.c, tree.c, typeck.c: Update for new tree-class enumeration constants. fortran: * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class enumeration constants. java: * java-tree.def: Use tree_code_class enumeration constants instead of code letters. * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for new tree-class enumeration constants. treelang: * treetree.c: Update for new tree-class enumeration constants. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87675 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/ChangeLog]zlaski2004-08-151-106/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-08-15 Ziemowit Laski <zlaski@apple.com> * Makefile.in (C_PRETTY_PRINT_H): Add c-pretty-print.h. (c-lang.o): Depend on c-objc-common.h. (c-objc-common.o): Depend on $(C_PRETTY_PRINT_H) and c-objc-common.h; remove duplicate $(C_TREE_H) dependency. * c-lang.c: Include c-objc-common.h. (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS, LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION, LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P, LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE, LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION, LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL, LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT, LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS, LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P, LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING, LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS, LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN, LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS): Move to c-objc-common.h. * c-objc-common.c: Include c-objc-common.h. * c-objc-common.h: New file. [gcc/objc/ChangeLog] 2004-08-15 Ziemowit Laski <zlaski@apple.com> * Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H), $(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h. (objc/objc-parse.o): Do not depend on gtype-objc.h. * objc-act.c: Do not include gtype-objc.h. (finish_file): Rename to objc_finish_file(). * objc-act.h (finish_file): Update copyright notice; remove prototype. * objc-lang.c: Update copyright notice; include diagnostic.h, c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include toplev.h. (finish_file): New hook routine. (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS, LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION, LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P, LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE, LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION, LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL, LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT, LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS, LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P, LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING, LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS, LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN, LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS): Move to c-objc-common.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86037 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-07-28 Eric Christopher <echristo@redhat.com>echristo2004-07-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (c_common_unsafe_for_reeval): Delete. * c-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete use. * c-pretty-print.c (pp_c_expression): Delete UNSAVE_EXPR case. * calls.c (fix_unsafe_tree): Delete. (expand_call): Delete code which used above. * dojump.c (do_jump): Delete UNSAVE_EXPR case. * expr.c (expand_expr_real_1): Ditto. * fold-const.c (non_lvalue): Ditto. * langhooks-def.h (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. (lhd_unsafe_for_reeval): Ditto. * langhooks.c (lhd_unsafe_for_reeval): Ditto. * langhooks.h (unsafe_for_reeval): Ditto. (unsave_expr_now): Adjust comment. * tree-inline.c (copy_body_r): Delete UNSAVE_EXPR bits. (estimate_num_insns_1): Ditto. * tree-pretty-print.c (dump_generic_node): Ditto. * tree.c (expr_align): Ditto. (unsave_expr): Delete. (unsafe_for_reeval): Ditto. * tree.h (unsafe_for_reeval, unsave_expr): Ditto. * tree.def (UNSAVE_EXPR): Delete. * objc/objc-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. 2004-07-28 Eric Christopher <echristo@redhat.com> * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. 2004-07-28 Eric Christopher <echristo@redhat.com> * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. (java_unsafe_for_reeval): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85276 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks.h (estimate_num_insns, pushlevel, poplevel, set_block,jsm282004-07-111-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | maybe_build_cleanup, update_decl_after_saving): Remove hooks. * langhooks.c (lhd_clear_binding_stack): Remove. * langhooks-def.h (lhd_clear_binding_stack, LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING, LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove. (LANG_HOOKS_CLEAR_BINDING_STACK): Define to lhd_do_nothing. * system.h (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING, LANG_HOOKS_POPLEVEL): Poison. * tree.h (poplevel): Don't declare. * c-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove. * objc/objc-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove. ada: * misc.c (LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove. cp: * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove. * cp-tree.h (poplevel): Declare. (set_block): Remove. * decl.c (set_block): Remove. fortran: * f95-lang.c (set_block): Remove. (gfc_clear_binding_stack): New. (LANG_HOOKS_CLEAR_BINDING_STACK): Define. (struct binding_level): Remove block_created_by_back_end. (clear_binding_level): Likewise. (poplevel): Don't handle block_created_by_back_end. java: * java-tree.h (set_block): Remove. * lang.c (java_clear_binding_stack): New. (LANG_HOOKS_CLEAR_BINDING_STACK): Define. * decl.c (struct binding_level): Remove this_block. (clear_binding_level): Likewise. (poplevel): Don't handle this_block. (set_block): Remove. treelang: * treetree.c (set_block): Remove. (struct binding_level): Remove block_created_by_back_end. (clear_binding_level): Likewise. (tree_code_create_function_initial, tree_code_create_function_wrapup): Call pushlevel and poplevel directly rather than through hooks. (poplevel): Don't handle block_created_by_back_end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84499 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (static_ctors, static_dtors): Make static.zack2004-07-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | (pop_file_scope): Call c_common_write_pch and cgraph_finalize_compilation_unit here. (build_cdtor): Moved here from c-objc-common.c; simplify. (c_write_global_declarations_1): Clarify comment. (c_write_global_declarations): Close the external scope before doing anything else. Call build_cdtor, cgraph_optimize, and mudflap_finish_file here. * c-lang.c (finish_file): Don't call c_objc_common_finish_file. Clarify comment. * c-objc-common.c: No need to include cgraph.h. (build_cdtor): Moved to c-decl.c. (c_objc_common_finish_file): Delete. * c-tree.h: Update to match. * objc/objc-act.c (finish_file): Don't call c_objc_common_finish_file. (generate_static_references): Set TREE_USED before calling finish_decl. Eliminate unnecessary dummy declaration. Call rest_of_decl_compilation on the static_instances_decl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84307 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-07-08 Joseph S. Myers <jsm@polyomino.org.uk>jsm282004-07-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neil Booth <neil@daikokuya.co.uk> PR c/2511 PR c/3325 * c-decl.c (finish_struct): Ensure bit-fields are given the correct type. * c-common.c (c_common_signed_or_unsigned_type): For C, require the precision to match as well as the mode. * expr.c (reduce_to_bit_field_precision): New function. (expand_expr_real_1): Reduce expressions of bit-field type to proper precision. * langhooks.h (reduce_bit_field_operations): New hook. * langhooks-def.h (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define. * c-lang.c, objc/objc-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define. * objc/objc-act.c (check_ivars): Convert types to bit-field types before checking. * tree.c (build_nonstandard_integer_type): New function. * tree.h (build_nonstandard_integer_type): New prototype. * tree-ssa.c (tree_ssa_useless_type_conversion_1): Don't treat conversions between integer and boolean types as useless. testsuite: * gcc.c-torture/execute/bitfld-1.x: Remove. * gcc.c-torture/execute/bitfld-3.c: New test. * gcc.dg/bitfld-2.c: Remove XFAILs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84279 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks.c: Don't include gt-langhooks.h.zack2004-07-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (var_labelno): Delete. (lhd_set_decl_assembler_name): Do not append a distinguishing number to file-scope internal-linkage declarations for the first input file, even if they have DECL_CONTEXT set. Use DECL_UID of the declaration itself (if at block scope), or its containing TRANSLATION_UNIT_DECL (if at file scope) for the distinguishing number. * opts.c (cur_in_fname): New global. * opts.h: Declare it. * tree.c: Include opts.h. (make_node_stat): If creating a TRANSLATION_UNIT_DECL, give it DECL_UID equal to cur_in_fname. (copy_node_stat): Do not change DECL_UID when copying a TRANSLATION_UNIT_DECL. (build_common_tree_nodes): Adjust next_decl_uid to reserve the range 0 .. num_in_fnames-1 for TRANSLATION_UNIT_DECLs. * c-decl.c (c_static_assembler_name): Delete. * c-tree.h (c_static_assembler_name): Delete prototype. * c-lang.c, objc/objc-lang.c: Don't override LANG_HOOKS_SET_DECL_ASSEMBLER_NAME. * Makefile.in (tree.o): Update dependencies. (GTFILES): Remove langhooks.c. cp: * decl.c (cxx_init_decl_processing): Call build_common_tree_nodes before creating the global NAMESPACE_DECL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84123 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/1027jsm282004-07-011-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-lang.c (c_initialize_diagnostics): Move from here ... * c-objc-common.c: ... to here. Include "c-pretty-print.h". (c_tree_printer): Use pretty-printer to format %T. * c-pretty-print.c (pp_c_specifier_qualifier_list): Include space before '*' if not C++. (pp_c_direct_abstract_declarator): Don't try to print array upper bound for flexible array members. * c-tree.h: Include "diagnostic.h". (c_initialize_diagnostics): Declare. * objc/objc-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Define. * c-format.c (format_type_warning): New function. Improve diagnostics for incorrect format argument types. (check_format_types): Use it. Add two parameters. Use the TYPE_MAIN_VARIANT of wanted_type. (check_format_info_main): Pass new parameters to check_format_types. (struct format_wanted_type): Update comment. testsuite: * gcc.dg/Wswitch-enum.c, gcc.dg/Wswitch.c, gcc.dg/format/branch-1.c, gcc.dg/format/diag-1.c, gcc.dg/format/multattr-3.c, gcc.dg/format/xopen-1.c: Update expected warning text. * gcc.dg/format/diag-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83965 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>kenner2004-06-261-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (c_safe_from_p, c_walk_subtrees): Deleted. * c-common.def (DECL_STMT): Remove. * c-common.h (DECL_STMT_DECL): Deleted. (COMPOUNT_LITERAL_EXPR_DECL): Use DECL_EXPR_DECL. (c_safe_from_p, c_walk_subtrees): Deleted. * c-decl.c, c-parse.in, c-pretty-print.c: DECL_STMT now DECL_EXPR. * c-dump.c (c_dump_tree, case DECL_STMT): Deleted. * c-gimplify.c (gimplify_decl_stmt): Deleted. (gimplify_compound_literal_expr): Use DECL_EXPR_DECL and gimplify_and_add. (c_gimplify_expr, case DECL_EXPR): New case. (c_gimplify_expr, case DECL_STMT): Deleted. * c-lang.c (LANG_HOOKS_SAFE_FROM_P): Likewise. (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Likewise. * expr.c (safe_from_p, case 's'): New case. * gimplify.c (gimplify_decl_expr): New function. (gimplify_expr, case DECL_EXPR): New case. * tree-inline.c (walk_tree): Walk into all fields of a type and decl only if they are in a DECL_EXPR. (mark_local_for_remap_r): Minor code cleanup. * tree-outof-ssa.c (discover_nonconstant_array_refs_r): Add else. * tree.c (has_cleanups, case DECL_EXPR): New case. * tree.def (DECL_EXPR): New code. * tree.h (DECL_EXPR_DECL): New macro. * objc/objc-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83721 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (lang_gimplify_stmt): Remove next_p argument.rth2004-06-161-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (if_elt, if_stack, if_stack_space, c_expand_start_cond, c_finish_then, c_expand_end_cond, c_expand_start_else, c_finish_else, c_begin_if_stmt, c_begin_while_stmt, c_finish_while_stmt_cond): Move to c-typeck.c. (finish_fname_decls, fname_decl): Use statement_lists. (c_expand_expr_stmt): Don't set last_expr_type. (c_type_hash): Fix indentation. (c_safe_from_p): Don't follow TREE_CHAIN. (c_tree_chain_matters_p): Remove. * c-common.def (SCOPE_STMT): Remove. (CLEANUP_STMT): Redefine to contain its own body. * c-common.h (struct stmt_tree_s): Remove x_last_stmt, x_last_expr_type, x_last_expr_filename, x_scope_stmt_stack. Add x_cur_stmt_list. (last_tree, last_expr_type, last_expr_filename, RECHAIN_STMTS): Remove. (cur_stmt_list): New. (STATEMENT_LIST_STMT_EXPR): New. (SCOPE_BEGIN_P, SCOPE_END_P, SCOPE_STMT_BLOCK, SCOPE_NULLIFIED_P, SCOPE_NO_CLEANUPS_P, SCOPE_PARTIAL_P, NEW_FOR_SCOPE_P): Remove. (CLEANUP_BODY): New. (CLEANUP_DECL): Move to operand 2. (c_common_stmt_codes): Remove SCOPE_STMT. (COMPOUND_STMT_NO_SCOPE, COMPOUND_STMT_BODY_BLOCK): Remove. * c-decl.c (c_scope_stmt_stack, current_scope_stmt_stack): Remove. (c_push_function_context, c_pop_function_context): Don't save it. (finish_decl): Set TREE_USED on the decl for a cleanup. Use push_cleanup. (store_parm_decls): Use statement lists. (finish_function): Remove compstmt rule workaround. Use statement lists. Call finish_fname_decls after finalizing the body. (c_begin_compound_stmt): Move to c-typeck.c. * c-dump.c (c_dump_tree): Remove SCOPE_STMT. * c-gimplify.c (gimplify_cleanup_stmt, gimplify_cleanup_stmts): New. (c_genericize): Invoke them. (c_gimplify_stmt): Don't look through TREE_CHAIN. Kill SCOPE_STMT. (c_build_bind_expr): Export. (gimplify_block, gimplify_cleanup): Remove. (gimplify_condition): Use gimplify_stmt. (gimplify_for_stmt): Remove FOR_INIT_STMT chaining hack. (gimplify_if_stmt): Remove recursion hack. (c_gimplify_expr): Remove STMT_EXPR handling. (stmt_expr_last_stmt, gimplify_stmt_expr): Remove. (is_last_stmt_of_scope): Remove. * c-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove. * c-mudflap.c (mflang_flush_calls): Use c_begin_compound_stmt, c_end_compound_stmt. * c-objc-common.c (build_cdtor): Likewise. * c-parse.in (primary): Use c_finish_stmt_expr. (push_scope, pop_scope): Remove. (c99_block_start, compstmt_start): Use c_begin_compound_stmt. (c99_block_end, compstmt): Use c_end_compound_stmt. (c99_block_lineno_labeled_stmt): Likewise. (compstmt_primary_start): Use c_begin_stmt_expr. (simple_if, select_or_iter_stmt): Update calls to stmt builders. (do_stmt_start): Fill in body directly. (lineno_stmt): Avoid setting lineno on constants. * c-pretty-print.c (pp_c_statement): Handle STATEMENT_LIST. Remove SCOPE_STMT. * c-semantics.c (begin_stmt_tree): Remove. (push_stmt_list, re_push_stmt_list, pop_stmt_list): New. (add_stmt): Use statement lists. (add_scope_stmt, finish_stmt_tree): Remove. (push_cleanup): New. * c-tree.h: Move some decls from c-common.h. * c-typeck.c (c_tree_expr_nonnegative_p): Simplify for statement lists. (do_case, c_finish_case): Likewise. (c_finish_then): Take body for then as argument. (c_finish_else): Similarly. (c_begin_for_stmt, c_finish_for_stmt_init, c_finish_for_stmt_cond, c_finish_for_stmt_incr, c_finish_for_stmt): New. (c_begin_stmt_expr, c_finish_stmt_expr): New. (c_begin_compound_stmt): Do scope management. (c_end_compound_stmt): New. * fold-const.c (tree_expr_nonnegative_p): Fix BIND_EXPR. * gimplify.c (voidify_wrapper_expr): Accept temporary argument. Look through exception handling constructs. (gimplify_bind_expr): Accept temporary argument. (gimplify_target_expr): Special case BIND_EXPR bodies. (gimplify_expr): Handle fallback == fb_none like a statement. * langhooks-def.h (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Kill. * langhooks.c (lhd_tree_inlining_tree_chain_matters_p): Remove. * langhooks.h (tree_chain_matters_p): Remove. * stub-objc.c (objc_clear_super_receiver): New. * tree-gimple.h (voidify_wrapper_expr): Update decl. (append_to_statement_list, append_to_statement_list_force): Move to tree-iterator.h. * tree-inline.c (expand_call_inline): Update call. (clone_body): Use statement lists. (walk_tree): Don't check tree_chain_matters_p. (copy_tree_r): Likewise. * tree-iterator.c (alloc_stmt_list): Clear lang bits. (tsi_link_before, tsi_link_after): Set TREE_SIDE_EFFECTS properly. * tree-iterator.h (append_to_statement_list, append_to_statement_list_force): Moved from tree-gimple.h. * tree-pretty-print.c (dump_generic_node): Clean up TARGET_EXPR dump. * objc/objc-act.c (build_module_descriptor): Use c_begin_compound_stmt. (objc_enter_block): Likewise. (objc_exit_block): Use c_end_compound_stmt. (objc_build_try_enter_fragment): Add #error and comment for rewriting for OBJCPLUS. (objc_build_extract_fragment, objc_build_try_epilogue, objc_build_catch_stmt, objc_build_finally_prologue, objc_build_finally_epilogue): Update for C statement builders. * objc/objc-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove. cp/ * call.c (initialize_reference): Don't build CLEANUP_STMT here. * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument. (genericize_try_block): Use gimplify_stmt. (genericize_catch_block, genericize_eh_spec_block): Likewise. (cp_gimplify_init_expr): Remove STMT_EXPR special case. (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call. * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove. (cp_tree_chain_matters_p): Remove. * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New. (COMPOUND_STMT_BODY_BLOCK): New. (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New. (EXPR_STMT_STMT_EXPR_RESULT): New. (building_stmt_tree): Check cur_stmt_list. (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove. (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New. * decl.c (poplevel): Use pop_stmt_list for minding cleanups. (cp_finish_decl): Use push_cleanup. (start_function, finish_function): Use statement lists. (finish_stmt): Do nothing. * except.c (begin_eh_spec_block): Use statement lists. (check_handlers_1, check_handlers): Likewise. * init.c (construct_virtual_base): Don't add extra compound stmts. (build_vec_init): Likewise. * name-lookup.c (maybe_push_cleanup_level): Use statement lists. * name-lookup.h (struct cp_binding_level): Add statement_list. * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool. (cp_parser_labeled_statement, cp_parser_expression_statement, cp_parser_statement_seq_opt): Likewise. (cp_parser_compound_statement): Likewise. Take bool for try block. (cp_parser_selection_statement): Tidy if processing. (cp_parser_already_scoped_statement): Rewrite to do what it says. * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr. (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST. Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT. * semantics.c (do_poplevel, do_pushlevel): Use statement lists. (finish_cond): New, rewritten from FINISH_COND. (simplify_loop_decl_cond): New. (finish_expr_stmt): Avoid nested EXPR_STMTs. (begin_if_stmt, finish_if_stmt_cond, finish_then_clause, begin_else_clause, finish_else_clause, finish_if_stmt, begin_while_stmt, finish_while_stmt_cond, finish_while_stmt, begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt, finish_for_cond, finish_for_stmt, begin_switch_stmt, finish_switch_cond, finish_switch_stmt, begin_try_block, finish_try_block, finish_cleanup_try_block, finish_function_try_block, finish_handler_sequence, finish_function_handler_sequence, begin_handler, finish_handler_parms, finish_handler, begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite using statement lists. (begin_compound_stmt): Replace has_no_scope argument with flags. Update all callers. Use statement lists. (finish_compound_stmt): Likewise. (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup. (current_scope_stmt_stack): Remove. (simplify_aggr_init_expr): Don't muck with TREE_CHAIN. * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): Rewrite with statement lists. testsuite/ * g++.dg/ext/stmtexpr1.C: XFAIL. * gcc.dg/20030612-1.c: XFAIL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83221 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-typeck.c (comptypes, tagged_types_tu_compatible_p,jsm282004-06-131-1/+1
| | | | | | | | | | | | function_types_compatible_p, type_lists_compatible_p): Remove flags parameter. * c-tree.h (comptypes): Likewise. (COMPARE_STRICT): Remove. * c-decl.c, c-lang.c, c-parse.in, c-typeck.c, objc/objc-act.c: All callers changed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83061 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge tree-ssa-20020619-branch into mainline.dnovillo2004-05-131-7/+23
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c: Verify that C_SIZEOF_STRUCT_LANG_IDENTIFIER is correct.zack2004-03-281-0/+2
| | | | | | | | | | | | | | | | | | | (struct c_binding, struct c_scope): Add chain_next attributes to GTY markers. (struct lang_identifier, struct lang_tree_node): Define here... * c-tree.h: ... not here. No longer need to declare struct c_binding either. Do define C_SIZEOF_STRUCT_LANG_IDENTIFIER. * c-lang.c, objc/objc-lang.c: Set LANG_HOOKS_IDENTIFIER_SIZE to C_SIZEOF_STRUCT_LANG_IDENTIFIER. PR 14734, 11944 * c-decl.c (get_parm_info): If error_mark_node is encountered in the bindings chain, unbind and discard it; don't abort. * testsuite/gcc.dg/noncompile/undeclared-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80042 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 12267, 12391, 12560, 13129, 14114, 14113zack2004-03-231-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79883 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/kazu2004-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | * alloc-pool.h, c-convert.c, c-lang.c, c-tree.h, caller-save.c, df.h, genconfig.c, global.c, lcm.c, ra-rewrite.c, ra.c, regclass.c, regs.h, resource.c, sched-rgn.c, config/arm/aof.h, config/arm/cirrus.md, config/arm/fpa.md, config/arm/iwmmxt.md, config/arm/netbsd-elf.h, config/arm/netbsd.h, config/m68hc11/m68hc11.md, config/mips/iris5.h, config/mn10300/mn10300.md, config/rs6000/altivec.md, config/sparc/netbsd-elf.h: Update copyright. cp/ * error.c, search.c: Update copyright. java/ * typeck.c: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77265 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-02-03 Paolo Bonzini <bonzini@gnu.org>paolo2004-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c/11658 PR c/13994 * Makefile.in (c-parse.o, c-convert.o, c-typeck.o): Depend on langhooks.h. * objc/Make-lang.in (objc-parse.o): Depend on langhooks.h. * c-parse.in, c-convert.c, c-typeck.c, objc/objc-act.c: Include langhooks.h. Replace c_common_truthvalue_conversion with the truthvalue_conversion language hook throughout. (expr_no_commas): Call default_conversion before save_expr for the first term of the production 'x ? : y'. * c-common.c (c_common_truthvalue_conversion): Remove obsolete block. Invoke recursively the hook instead of this function. * c-convert.c (convert): handle ERROR_MARK_NODE. * c-typeck.c (build_binary_op): handle ERROR_MARK_NODE returned by the truthvalue_conversion language hook. * c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Use c_objc_common_truthvalue_conversion. * c-objc-common.c (c_objc_common_truthvalue_conversion): New function. * c-tree.h (c_objc_common_truthvalue_conversion): Declare it. * objc/objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Use c_objc_common_truthvalue_conversion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77168 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-09-24 Ziemowit Laski <zlaski@apple.com>zlaski2003-09-251-47/+0
| | | | | | | | | MERGE OF objc-improvements-branch into MAINLINE. See 'gcc/ChangeLog' and 'gcc/testsuite/ChangeLog' for the gory details. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71748 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks-def.h (lhd_register_builtin_type): New function.mmitchel2003-09-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | (LANG_HOOKS_REGISTER_BUILTIN_TYPE): New macro. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Update. * langhooks.h (lang_hooks_for_types): Add register_builtin_type. * langhooks.c (lhd_register_builtin_type): New function. * c-common.h (c_register_builtin_type): Declare. * c-common.c (c_register_builtin_type): New function. * c-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to c_register_builtin_type. * config/ia64/hpux.h (TARGET_OS_CPP_BUILTINS): Remove __fpreg, __float80, and __float128 macros. * config/ia64/ia64.c (ia64_init_builtins): Create __fpreg, __float80, and __float128 types. * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to c_register_builtin_type. * gcc.dg/ia64-types1.c: New test. * gcc.dg/ia64-types2.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71227 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rth2003-08-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree-optimize.c: New file. * Makefile.in (OBJS-archive): Add tree-optimize.o. (tree-optimize.o): New. * c-decl.c (store_parm_decls): Use allocate_struct_function. (finish_function): Don't free_after_parsing or free_after_compilation. (set_save_expr_context): Move to tree-optimize.c. (c_expand_body_1): Use tree_rest_of_compilation. * c-lang.c (LANG_HOOKS_RTL_EXPAND_STMT): New. * objc/objc-lang.c (LANG_HOOKS_RTL_EXPAND_STMT): New. * c-objc-common.c (expand_deferred_fns): Don't emit unused inlines; iterate until closure. * langhooks-def.h (LANG_HOOKS_RTL_EXPAND_START, LANG_HOOKS_RTL_EXPAND_STMT, LANG_HOOKS_RTL_EXPAND_END): New. (LANG_HOOKS_RTL_EXPAND_INITIALIZER): New. * langhooks.h (struct lang_hooks_for_rtl_expansion): New. * toplev.h (tree_rest_of_compilation): Declare it. gcc/cp/ * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New. (LANG_HOOKS_RTL_EXPAND_STMT): New. * cp-tree.h (cxx_expand_function_start): Declare. * decl.c (start_function): Use allocate_struct_function. Move stmts_are_full_exprs_p assertion from expand_body. Do not free_after_parsing or free_after_compilation. (cxx_push_function_context): Move code to set struct function data from genrtl_start_function. * optimize.c (optimize_function): Don't inc/dec function_depth. * semantics.c (expand_body): Use tree_rest_of_compilation. (cxx_expand_function_start): Rename from genrtl_start_function, omit bits done by tree_rest_of_compilation. (genrtl_finish_function): Remove. (clear_decl_rtl): Move to ../tree-optimize.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70933 138bc75d-0d04-0410-961f-82ee72b054a4
* * pretty-print.h (pp_maybe_newline_and_indent): New macro.gdr2003-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70777 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/10538, PR c/5582pinskia2003-08-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ChangeLog: * langhooks-def.h (lhd_decl_uninit): Declare. (LANG_HOOKS_DECL_UNINIT): New macro. (LANG_HOOKS_INITIALIZER): Adjust. * langhooks.h (struct lang_hooks): Add new field decl_uninit. * langhooks.c (lhd_decl_uninit): Define. * c-common.c (c_decl_uninit_1): New function. (c_decl_uninit): New function. (warn_init_self): Define. * c-common.h (c_decl_uninit): Declare. (warn_init_self): Declare. * c.opt: Introduce -Winit-self. * c-opts.c (c_common_handle_options): Set warn_init_self. * c-lang.c (LANG_HOOKS_DECL_UNINIT): Define. * objc/objc-lang.c (LANG_HOOKS_DECL_UNINIT): Define. * function.c (uninitialized_vars_warning): Call the language hook. * doc/invoke.texi: Document -Winit-self. cp/ChangeLog: * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define. testsuite: * gcc.dg/uninit-D.c: New Test. * gcc.dg/uninit-E.c: New Test. * gcc.dg/uninit-F.c: New Test. * gcc.dg/uninit-G.c: New Test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70574 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks-def.h (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.gdr2003-08-191-2/+2
| | | | | | | | | | (LANG_HOOKS_INITIALIZER): Correct. * c-lang.c: Likewise. cp/ * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70561 138bc75d-0d04-0410-961f-82ee72b054a4
* * pretty-print.c (pp_base_indent): Rename from pp_indent.gdr2003-08-101-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70299 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (flag_noniso_default_format_attributes): Delete.sayle2003-08-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (built_in_attribute): Don't define/undefine DEF_FN_ATTR. (c_attrs_initialized): Delete. (c_common_nodes_and_builtins): Don't test c_attrs_initialized, always call c_init_attributes. (c_init_attributes): Don't define/undefine DEF_FN_ATTR. Don't set c_attrs_initialized when done. (c_common_insert_default_attributes): Delete. * c-common.h (flag_noniso_default_format_attributes): Delete. (c_coomon_insert_default_attributes): Delete prototype. * c-opts.c (set_std_c89, set_std_c99, set_std_cxx98): Dont set flag_noniso_default_format_attributes. * c-decl.c (c_insert_default_attributes): Delete. * c-tree.h (c_insert_default_attributes): Delete prototype. * attribs.c (decl_attributes): Don't call insert_default_attributes langhook. Update function description comment. * langhooks.h (lang_hooks): Remove insert_default_attributes field. * langhooks-def.h (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Delete. * c-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. * system.h: Poison LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES macro. cp/ * decl.c (cxx_insert_default_attributes): Delete. * cp-tree.h (cxx_insert_default_attributes): Don't prototype. * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. objc/ * objc-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70155 138bc75d-0d04-0410-961f-82ee72b054a4
* * opts.c (in_fnames, num_in_fnames): Moved here from c-opts.bothner2003-07-311-2/+0
| | | | | | | | | | | | | | | | | | | | | (add_input_filename): New function. (handle_options): Call add_input_filename directly instead of with a lang hook. * opts.h (in_fnames, num_in_fnames): Moved here. (add_input_filename): Declare. * c-decl.c: Need to #include opts.h. * Makefile.in (c-decl.o): Also depends on opts.h. * c-opts.c (in_fnames, num_in_fnames): Moved to opts.c. (c_common_handle_filename): Replaced by add_input_filename. * c-common.h (in_fnames, num_in_fnames, c_common_handle_filename): Remove. * langhooks.h (struct lang_hooks): Remove handle_filename hook. * langhooks-def.h (LANG_HOOKS_HANDLE_FILENAME): Remove macro. (LANG_HOOKS_INITIALIZER): Remove use of LANG_HOOKS_HANDLE_FILENAME. * c-lang.c (LANG_HOOKS_HANDLE_FILENAME): Remove macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70012 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 11498geoffk2003-07-171-0/+2
| | | | | | | | | | | | | | | | | | | | | * Makefile.in (c-opts.o): Add $(LANGHOOKS_DEF_H). (langhooks.o): Add $(GGC_H), gt-langhooks.h. (GTFILES): Add langhooks.c. (gt-langhooks.h): New. * c-common.h (c_static_assembler_name): Prototype. * c-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Define. * objc/objc-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Define. * c-opts.c: Include langhooks-def.h. (c_static_assembler_name): New. * langhooks.c: Include ggc.h. Include gt-langhooks.h. (var_labelno): New. (lhd_set_decl_assembler_name): Give static objects with context unique names. * varasm.c (var_labelno): Delete. (make_decl_rtl): Don't change the assembler name once it's set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69527 138bc75d-0d04-0410-961f-82ee72b054a4
* Index: ChangeLoggeoffk2003-07-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-07-10 Geoffrey Keating <geoffk@apple.com> * c-decl.c (finish_decl): Handle 'used' here... * cgraphunit.c (cgraph_finalize_function): ... and here ... * c-common.c: (handle_used_attribute): ... not here. * configure.in (onstep): Support --enable-intermodule. * Makefile.in (OBJS-common): New. (OBJS-md): New. (OBJS-archive): New. (OBJS): Build from OBJS-common, OBJS-md, OBJS-archive. (OBJS-onestep): New. (libbackend.a): Support @onestep@. (libbackend.o): New. * configure: Regenerate. * c-common.h (c_reset_state): New prototype. (c_parse_file): New prototype. (finish_file): Move prototype from c-tree.h. * c-decl.c: Include <hashtab.h>. (builtin_decls): New. (current_file_decl): New. (duplicate_decls): Add extra parameter. Change all callers. Don't output duplicate common symbols. (link_hash_hash): New. (link_hash_eq): New. (poplevel): Handle popping of the top level. (warn_if_shadowing): Handle TRANSLATION_UNIT_DECL. (pushdecl): Set DECL_CONTEXT to TRANSLATION_UNIT_DECL if appropriate. (pushdecl_top_level): Likewise. (redeclaration_error_message): Handle TRANSLATION_UNIT_DECL. (c_init_decl_processing): Create TRANSLATION_UNIT_DECL. (finish_decl): Handle TRANSLATION_UNIT_DECL. (merge_translation_unit_decls): New. (c_write_global_declarations): New. (c_reset_state): New. (implicitly_declare): Handle TRANSLATION_UNIT_DECL. * c-lang.c (LANG_HOOKS_WRITE_GLOBALS): New. * c-objc-common.c (c_cannot_inline_tree_fn): Handle TRANSLATION_UNIT_DECL. (c_objc_common_finish_file): Call merge_translation_unit_decls. * c-opts.c (in_fnames): Rename from in_fname. (c_common_decode_option): Handle multiple input filenames. (c_common_post_options): Likewise. (c_common_parse_file): Likewise; also, call c_parse_file rather than yyparse. * c-parse.in: Move cleanup code to c_parse_file. (free_parser_stacks): Move contents to c_parse_file. (c_parse_file): New. * c-tree.h (union lang_tree_node): Chain along TYPE_NEXT_VARIANT for integer types. (C_DECL_FILE_SCOPE): New. (finish_file): Move prototype to c-common.h. (merge_translation_unit_decls): New prototype. (comptypes): Add extra parameter to prototype. (c_write_global_declarations): New prototype. * c-typeck.c (tagged_types_tu_compatible_p): New. (function_types_compatible_p): Add extra parameter, change all callers. (type_lists_compatible_p): Likewise. (comptypes): Likewise. (struct tagged_tu_seen): New. (tagged_tu_seen_base): New. (build_unary_op): Handle TRANSLATION_UNIT_DECL. (c_mark_addressable): Remove #if 0 code. * calls.c (special_function_p): Handle TRANSLATION_UNIT_DECL, add comment explaining why it shouldn't have to. * cgraph.h (struct cgraph_node): Add chain_next and chain_prev GTY options. * cppinit.c (cpp_read_next_file): New. (cpp_read_main_file): Use it. * cpplib.c (undefine_macros): New. (cpp_undef_all): New. * cpplib.h (cpp_read_next_file): Prototype. (cpp_undef_all): Prototype. * langhooks-def.h (write_global_declarations): Remove prototype. * toplev.h (write_global_declarations): Add prototype. * tree.c (decl_type_context): Use switch statement, handle TRANSLATION_UNIT_DECL. * tree.def: Update documentation for TRANSLATION_UNIT_DECL. (TRANSLATION_UNIT_DECL): New kind of tree. * tree.h: Update documentation for TRANSLATION_UNIT_DECL. * Makefile.in (c-decl.o): Add $(HASHTAB_H) to dependencies. * doc/invoke.texi: Make attempt to document new functionality. 2003-05-19 Per Bothner <bothner@apple.com> * gcc.c (combine_inputs): New. (process_command): Set combine_inputs. (do_spec_1): Handle combine_inputs. (main): Likewise. Index: cp/ChangeLog 2003-07-10 Geoffrey Keating <geoffk@apple.com> * decl.c (cp_finish_decl): Handle 'used' attribute. * cp-lang.c (c_reset_state): New dummy routine. * cp-tree.h (finish_file): Move prototype to c-common.h. * parser.c (c_parse_file): Rename from yyparse; don't call finish_file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69224 138bc75d-0d04-0410-961f-82ee72b054a4
* * java-tree.h (DECL_NUM_STMTS): Rename to...hubicka2003-07-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (DECL_ESTIMATED_INSNS): ... this. * lang.c (java_estimate_num_insns, java_estimate_num_insns_1): New static functions. (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define. * parser.y (add_stmt_to_compound): Do not account statements. * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New. * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS. (start_function): Use DECL_ESTIMATED_INSNS. * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS. * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in unit-at-a-time * c-common.c (c_estimate_num_insns_1): New static function. (c_estimate_num_insns): New global function. * c-common.h (DECL_NUM_STMTS): Rename to... (DECL_ESTIMATED_INSNS): ... this. (c_estimate_num_insns): Declare. * c-decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS. * c-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New. * c-semantics.c (add_stmt): Do not account statements. * langhooks-def.h (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New. * langhooks.h (lang_hooks_for_tree_inlining): Add estimate_num_insns * params.def (max-inline-insns-auto, max-inline-insns-auto): set to 100. (max-inline-insns): set to 300. (min-inline-insns): set to 10. * tree-inline.c (struct inline_data): Rename inlined_stmts to inlined-insns. (INSNS_PER_STMT): Kill. (inlinable_function_p): Compute and store body size. (expand_call_inline): Likewise. (optimize_inline_calls): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69113 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (c_comon_handle_filename,neil2003-07-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c_common_missing_arguement): New. * c-lang.c (LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT): New. * c-opts.c (missing_arg): Rename c_common_missing_argument, update to be an appropriate langhook. (c_common_handle_option): Don't handle filenames. (c_common_handle_filename): New. * hooks.c (hook_void_constcharptr, hook_bool_constcharptr_size_t_false): New. * hooks.h (hook_void_constcharptr, hook_bool_constcharptr_size_t_false): New. * langhooks-def.h (LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): Add handle_filename and missing_argument. * opts.c (handle_option): Don't handle filenames here, but ... (handle_options): ... here. (common_handle_option): Don't handle missing arguments here. * objc/objc-lang.c (LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT): New. ada: * misc.c (gnat_handle_option): Don't handle filenames. cp: * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT): Override. f: * top.c (ffe_handle_option): Don't handle filenames. java: * lang.c (java_handle_option): Don't handle filenames. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69011 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (enum c_language_kind, flag_objc): Remove.neil2003-06-301-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (fix_string_type, check_case_value, c_common_nodes_and_builtins, c_add_case_label, finish_label_addr_expr, boolean_increment): Use c_dialect_ macros. * c-common.h (enum c_language_kind): Extend. (c_dialect_cxx, c_dialect_objc): New. (flag_objc): Remove. (c_common_init_options): Update prototype. * c-cppbuiltin.c (define__GNUC__, c_cpp_builtins): Use c_dialect_ macros. * c-decl.c (finsih_decl, grokfield, finish_struct): Use c_dialect_ macros. * c-format.c (C_STD_VER, C_STD_NAME): Similarly. * c-lang.c (c_init_options): Remove. (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. * c-lex.c (lex_charconst): Use c_dialect_cxx(). * c-opts.c (lang_flags): Make function-local. (c_common_init_options): Use c_dialect_ macros. Handle C++ diagnostic requirements. (c_common_handle_option, c_common_post_options): Use flag_cxx. * c-parse.in (init_reswords): Use c_dialect_objc (). * c-pch.c (get_ident): Use c_language. * c-pretty-print.c (pp_c_bool_literal): Use c_dialect_ macros. * c-typeck.c (comptypes, build_c_cast): Similarly. * objc/objc-lang.c (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. (objc_init_options): Remove. cp: * Make-lang.in: Update. * cp-lang.c (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. * cp-tree.h (cxx_init_options): Remove. * lex.c: Don't include diagnostic.h. (cxx_init_options): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68734 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 10178zack2003-06-251-0/+2
| | | | | | | | | | | | * langhooks.h (struct lang_hooks): Add no_body_blocks bool. * langhooks-def.h (LANG_HOOKS_NO_BODY_BLOCKS): New; default false. * c-lang.c, objc/objc-lang.c: Override LANG_HOOKS_NO_BODY_BLOCKS to true. * stmt.c (is_body_block): If lang_hooks.no_body_blocks, always return 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68483 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lang.c: Convert to ISO C90.aj2003-06-221-19/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68326 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (OJBS, c-opts.o): Update.neil2003-06-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (c-options.c, c-options.h): Rename options.h and options.c. (options.h): Rename options_.h. (opts.o): New. * c-common.h (c_common_handle_option): Replace c_common_decode_option. (c_common_init_options): Update prototype. * c-lang.c (c_init_options): Update prototype. (LANG_HOOKS_HANDLE_OPTION): Override. (LANG_HOOKS_DECODE_OPTION): Drop. * c-opts.c: Include opts.h and options.h instead of c-options.h and c-options.c. (lang_flags): Move to file scope. (find_opt, c_common_decode_option): Remove. (CL_C, CL_OBJC, CL_CXX, CL_OBJCXX, CL_JOINED, CL_SEPARATE, CL_REJECT_NEGATIVE): Move to opts.h. (missing_arg): Update prototype. (c_common_init_options): Update for new prototype. (c_common_handle_options): Filenames are passed as N_OPTS. * hooks.c (hook_int_void_0): New. * hooks.h (hook_int_void_0): New. * langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): New default. (LANG_HOOKS_HANDLE_OPTION): Default to NULL for now. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (init_options): Update. (handle_option): New. * opts.c, opts.h: New files. * opts.sh: Update c file to include opts.h and options.h. * toplev.c: Include opts.h; change options.h to options_.h. (parse_options_and_default_flags): Get lang_mask, use handle_option for language-specific handling. * objc/objc-lang.c (LANG_HOOKS_DECODE_OPTON): Drop. (LANG_HOOKS_HANDLE_OPTION): Override. (objc_init_options): Update. ada: * misc.c (gnat_init_options): Update. cp: * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop. (LANG_HOOKS_HANDLE_OPTION): Override. * cp-tree.h (cxx_init_options): Update. * lex.c (cxx_init_options): Update. f: * com.c (ffe_init_options): Update. java: * lang.c (java_init_options): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67584 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (CRTSTUFF_CFLAGS): Add -fno-unit-at-a-timehubicka2003-02-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (OBJS): Add callgraph.o (callgraph.o): New. * c-decl.c (expand_body_1): Break out from ... (expand_body): This one; change calling convention (finish_function): Move some of expand_body logic here. (c_expand_deferred_function): Update call of expand_body (c_expand_stmt): Use c_expand_body_1. * c-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define. * c-objc-commin.c (c_objc_common_finish_file): Use callgraph code. * c-tree.h (c_expand_body): Declare. * callgraph.c: New file. * flags.h (flag_unit_at_a_time): Declare. * langhooks.h (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION, LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_CALLGRAPH_INITIALIZER): New macros. * langhooks.h (struct lang_hooks_for_callgraph): New. (struct lang_hooks): Add callgraph field. * toplev.c (flag_unit_at_a_time): New. (lang_independent_options): Add flag_unit_at_a_time. (process_options): Disable unit-at-a-time mode for frontends not supporting callgraph. * tree-inline.c (typedef struct inline_data): Add "decl" (expand_call_inline): Update callgraph. (optimize_inline_calls): Set id.decl. * tree.h (cgraph_finalize_function, cgraph_finalize_compilation_unit, cgraph_create_edges, dump_cgraph, cgraph_optimize, cgraph_remove_call cgraph_calls_p): Declare. * invoke.texi (-funit-at-a-time): Document git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62789 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/ChangeLog]zlaski2002-09-061-0/+7
| | | | | | | | | | | | | | | | | | | 2002-09-06 Ziemowit Laski <zlaski@apple.com> * c-lang.c (objc_is_id): New stub. * c-tree.h (objc_is_id): New forward declaration. * c-typeck.c (build_c_cast): Do not strip protocol qualifiers from 'id' type. * objc/objc-act.c (objc_comptypes): Correct handling of protocol qualifiers. (objc_is_id): New. [gcc/testsuite/ChangeLog] 2002-09-05 Ziemowit Laski <zlaski@apple.com> * objc.dg/proto-lossage-1.m: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56905 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lang.c (recognize_objc_keyword): Remove, no longer used.shebs2002-09-031-6/+0
| | | | | | | | * c-tree.h (recognize_objc_keyword): Remove decl. * c-typeck.c (comp_target_types): Update a comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56760 138bc75d-0d04-0410-961f-82ee72b054a4