aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-objcp-common.h
AgeCommit message (Collapse)AuthorFilesLines
2007-10-26expr.c (cxx_expand_expr): Removed.Ollie Wild1-1/+1
gcc/cp/ * expr.c (cxx_expand_expr): Removed. * cp-tree.h (exx_expand_expr): Removed. * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr with c_expand_expr. From-SVN: r129645
2007-10-08varasm.c (compare_constant): Removed call to lang_hooks.expand_constant.Ollie Wild1-2/+0
gcc/ * varasm.c (compare_constant): Removed call to lang_hooks.expand_constant. (copy_constants): Removed call to lang_hooks.expand_constant. (compute_reloc_for_constant): Removed call to lang_hooks.expand_constant. (output_addressed_constants): Removed call to lang_hooks.expand_constant. (constructor_static_from_elts_p): Removed call to lang_hooks.expand_constant. (output_constant): Removed calls to lang_hooks.expand_constant. * langhooks.h (struct lang_hooks): Removed field expand_constant. * langhooks-def.h (lhd_return_tree): Removed. (LANG_HOOKS_EXPAND_CONSTANT): Removed. (LANG_HOOKS_INITIALIZER): Removed LANG_HOOKS_EXPAND_CONSTANT. * langhooks.c (lhd_return_tree): Removed. gcc/cp/ * typeck2.c (digest_init): Call cplus_expand_constant after convert_for_initialization. * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed. * expr.c (cplus_expand_constant): Updated function description. gcc/ada/ * misc.c (LANG_HOOKS_PUSHDECL): Replaced lhd_return_tree with gnat_return_tree. (gnat_init_gcc_eh): Replaced gnat_eh_runtime_type with gnat_return_tree. (gnat_eh_runtime_type): Removed. (gnat_return_tree): New function. From-SVN: r129133
2007-09-29RevertOllie Wild1-0/+2
2007-09-27 Ollie Wild <aaw@google.com> gcc/ * varasm.c (compare_constant): Removed call to lang_hooks.expand_constant. (copy_constants): Removed call to lang_hooks.expand_constant. (compute_reloc_for_constant): Removed call to lang_hooks.expand_constant. (output_addressed_constants): Removed call to lang_hooks.expand_constant. (constructor_static_from_elts_p): Removed call to lang_hooks.expand_constant. (output_constant): Removed calls to lang_hooks.expand_constant. * langhooks.h (struct lang_hooks): Removed field expand_constant. * langhooks-def.h (lhd_return_tree): Removed. (LANG_HOOKS_EXPAND_CONSTANT): Removed. (LANG_HOOKS_INITIALIZER): Removed LANG_HOOKS_EXPAND_CONSTANT. * langhooks.c (lhd_return_tree): Removed. gcc/cp/ * typeck2.c (digest_init): Call cplus_expand_constant after convert_for_initialization. * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed. * expr.c (cplus_expand_constant): Updated function description. From-SVN: r128881
2007-09-28varasm.c (compare_constant): Removed call to lang_hooks.expand_constant.Ollie Wild1-2/+0
gcc/ * varasm.c (compare_constant): Removed call to lang_hooks.expand_constant. (copy_constants): Removed call to lang_hooks.expand_constant. (compute_reloc_for_constant): Removed call to lang_hooks.expand_constant. (output_addressed_constants): Removed call to lang_hooks.expand_constant. (constructor_static_from_elts_p): Removed call to lang_hooks.expand_constant. (output_constant): Removed calls to lang_hooks.expand_constant. * langhooks.h (struct lang_hooks): Removed field expand_constant. * langhooks-def.h (lhd_return_tree): Removed. (LANG_HOOKS_EXPAND_CONSTANT): Removed. (LANG_HOOKS_INITIALIZER): Removed LANG_HOOKS_EXPAND_CONSTANT. * langhooks.c (lhd_return_tree): Removed. gcc/cp/ * typeck2.c (digest_init): Call cplus_expand_constant after convert_for_initialization. * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed. * expr.c (cplus_expand_constant): Updated function description. From-SVN: r128859
2007-09-24re PR c++/33506 (TYPE_RAISES_EXCEPTIONS dumped with attributes)Jakub Jelinek1-0/+2
PR c++/33506 * langhooks.h (struct lang_hooks_for_types): Add type_hash_eq field. * langhooks-def.h (LANG_HOOKS_TYPE_HASH_EQ): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add LANG_HOOKS_TYPE_HASH_EQ. * tree.c (type_hash_eq): For FUNCTION_TYPE use lang_hooks.type.type_hash_eq in addition to generic tests. * cp-tree.h (cxx_type_hash_eq): New prototype. * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine. * tree.c (cxx_type_hash_eq): New function. * g++.dg/ext/attrib29.C: New test. From-SVN: r128718
2007-09-11decl.c (java_expand_body): Kill.Jan Hubicka1-2/+2
* decl.c (java_expand_body): Kill. (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill. * toplev.c (process_options): all frontends now do unit-at-a-time. * cgraphunit.c: update comments. (cgraph_expand_function): call passmanager dirrectly; emit thunks. * c-decl.c (finish_function): use cgraph_add_new_function. * method.c (use_thunk): Use tree_rest_of_compilation * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill. (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define. * cp-tree.h (expand_body): Kill. (emit_associated_thunks): Declare. * semantics.c (emit_associated_thunks): Export. (expand_body): Kill. * misc.c (gnat_expand_body): Kill. (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill. * f95-lang.c (gfc_expand_function): Kill. (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill. * function.c (expand_function_end): We are always unit-at-a-time. From-SVN: r128367
2007-08-24Makefile.in (tree-inline.o): Add $(TARGET_H) and $(INTEGRATE_H) dependencies.Richard Guenther1-3/+0
2007-08-24 Richard Guenther <rguenther@suse.de> * Makefile.in (tree-inline.o): Add $(TARGET_H) and $(INTEGRATE_H) dependencies. * c-objc-common.c (c_cannot_inline_tree_fn): Remove. * langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Likewise. * tree-inline.c (inlinable_function_p): Fold in common parts of the cannot_inline_tree_fn langhook. * langhooks-def.h (lhd_tree_inlining_cannot_inline_tree_fn): Remove. (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN): Likewise. (LANG_HOOKS_TREE_INLINING_INITIALIZER): Remove initializer for cannot_inline_tree_fn langhook. * langhooks.h (struct lang_hooks_for_tree_inlining): Remove cannot_inline_tree_fn member. cp/ * tree.c (cp_cannot_inline_tree_fn): Remove. * cp-tree.h (cp_cannot_inline_tree_fn): Likewise. * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN): Remove define. From-SVN: r127763
2007-08-20langhooks-def.h (lhd_tree_inlining_auto_var_in_fn_p): Remove.Richard Guenther1-3/+0
2007-08-20 Richard Guenther <rguenther@suse.de> * langhooks-def.h (lhd_tree_inlining_auto_var_in_fn_p): Remove. (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P): Likewise. (LANG_HOOKS_TREE_INLINING_INITIALIZER): Remove initializer for auto_var_in_fn_p langhook. * langhooks.c (lhd_tree_inlining_auto_var_in_fn_p): Rename and move ... * tree.c (auto_var_in_fn_p): ... here. (find_var_from_fn): Call auto_var_in_fn_p directly. * langhooks.h (lang_hooks_for_tree_inlining): Remove auto_var_in_fn_p langhook. * tree-inline.c (remap_decls): Call auto_var_in_fn_p directly. (copy_body_r): Likewise. (self_inlining_addr_expr): Likewise. * tree.h (auto_var_in_fn_p): Declare. cp/ * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P): Remove. * cp-tree.h (cp_auto_var_in_fn_p): Remove. (nonstatic_local_decl_p): Likewise. * tree.c (cp_auto_var_in_fn_p): Remove. * decl.c (nonstatic_local_decl_p): Remove. From-SVN: r127643
2007-08-20tree.c (WALK_SUBTREE): Call walk_tree_1.Richard Guenther1-3/+0
2007-08-20 Richard Guenther <rguenther@suse.de> * tree.c (WALK_SUBTREE): Call walk_tree_1. (walk_type_fields): Take lh parameter. (walk_tree): Rename to ... (walk_tree_1): ... this. Do not call the walk_subtrees langhook but the now passed callback. Pass lh on recursion. (walk_tree_without_duplicates): Rename to ... (walk_tree_without_duplicates_1): ... this. Take lh parameter and call walk_tree_1. * tree.h (walk_tree_lh): New typedef. (walk_tree_1): Declare. (walk_tree_without_duplicates_1): Likewise. (walk_tree): New define to walk_tree_1 with NULL lh parameter. (walk_tree_without_duplicates): New define to walk_tree_without_duplicates_1 with NULL lh parameter. * langhooks.c (lhd_tree_inlining_walk_subtrees): Remove. * langhooks.h (lang_hooks_for_tree_inlining): Remove walk_subtrees langhook. * langhooks-def.h (lhd_tree_inlining_walk_subtrees): Remove. (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Likewise. (LANG_HOOKS_TREE_INLINING_INITIALIZER): Remove walk_subtrees initializer. java/ * lang.c (java_tree_inlining_walk_subtrees): Remove. (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove. cp/ * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove define. * tree.h (cp_walk_tree): New define to walk_tree_1 with cp_walk_subtrees lh parameter. (cp_walk_tree_without_duplicates): New define to walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter. * tree.c (count_trees): Call cp_walk_tree_without_duplicates. (verify_stmt_tree): Call cp_walk_tree. (break_out_target_exprs): Likewise. (WALK_SUBTREE): Likewise. * cp-gimplify.c (cp_genericize): Likewise. * cp-pt.c (find_parameter_packs_r): Likewise. (uses_parameter_packs): Likewise. (make_pack_expansion): Likewise. (check_for_bare_parameter_packs): Likewise. (for_each_template_parm): Likewise. * decl.c (check_default_argument): Call cp_walk_tree_without_duplicates. * except.c (build_throw): Likewise. * decl2.c (type_visibility): Likewise. * semantics.c (expand_or_defer_fn): Likewise. (finalize_nrv): Call cp_walk_tree. From-SVN: r127642
2007-08-02typeck.c: Change copyright header to refer to version 3 of the GNU General ↵Nick Clifton1-5/+4
Public... * typeck.c: Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page. * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c, config-lang.in, cp-tree.def, call.c, decl.h, ptree.c, Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c, cp-objcp-common.h, except.c, error.c, operators.def, cvt.c, tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c, cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c, cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c, name-lookup.h, parser.c: Likewise. From-SVN: r127154
2007-06-11really remove signed(_or_unsigned)?_type langhooksRafael Espindola1-4/+0
From-SVN: r125621
2007-05-14c-common.c (warnings_for_convert_and_check): Use unsigned_type_for instead ↵Rafael Avila de Espindola1-2/+0
of c_common_unsigned_type. gcc/ * c-common.c (warnings_for_convert_and_check): Use unsigned_type_for instead of c_common_unsigned_type. (c_common_unsigned_type): Remove. (shorten_compare): Use c_common_signed_or_unsigned_type instead of c_common_unsigned_type. (c_common_nodes_and_builtins): Use unsigned_type_for instead of c_common_unsigned_type. * c-common.h (c_common_unsigned_type): Remove. * c-decl.c (grokdeclarator): Use unsigned_type_for instead of c_common_unsigned_type. * c-format.c (check_format_types): Use unsigned_type_for instead of c_common_unsigned_type. * c-objc-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove. * c-typeck.c (convert_for_assignment): Use unsigned_type_for instead of c_common_unsigned_type. * convert.c (convert_to_integer): Use unsigned_type_for instead of lang_hooks.types.unsigned_type. * expmed.c (make_tree): Use unsigned_type_for instead of lang_hooks.types.unsigned_type. * fold-const.c (fold_negate_expr): Use unsigned_type_for instead of lang_hooks.types.unsigned_type. (build_range_check): Likewise. (fold_unary): Likewise. (fold_binary): Likewise. (fold_ternary): Likewise. * langhooks-def.h (LANG_HOOKS_UNSIGNED_TYPE): Remove. * langhooks.h (lang_hooks_for_types): Remove unsigned_type. * tree.c (get_unsigned_type): New. (unsigned_type_for): Use get_unsigned_type instead of lang_hooks.types.unsigned_type gcc/ada * misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove. gcc/cp * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove. * decl.c (grokdeclarator): Use unsigned_type_for instead of c_common_unsigned_type. gcc/fortran * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove. * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for instead of gfc_unsigned_type. * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of gfc_unsigned_type. * trans-types.c (gfc_unsigned_type): Remove. * trans-types.h (gfc_unsigned_type): Remove. gcc/java * expr.c (build_java_binop): Use unsigned_type_for instead of java_unsigned_type. * java-tree.h (java_unsigned_type): Remove. * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove. * typeck.c (java_unsigned_type): Remove. gcc/treelang * treetree.c (tree_lang_unsigned_type): Remove. (LANG_HOOKS_UNSIGNED_TYPE): Remove. From-SVN: r124715
2007-04-08langhooks.c (lhd_tree_inlining_add_pending_fn_decls, [...]): Remove.Steven Bosscher1-5/+0
* langhooks.c (lhd_tree_inlining_add_pending_fn_decls, lhd_tree_inlining_anon_aggr_type_p, lhd_tree_inlining_start_inlining, lhd_tree_inlining_end_inlining): Remove. * langhooks.h (struct lang_hooks_for_tree_inlining): Remove then add_pending_fn_decls, anon_aggr_type_p, start_inlining, and end_inlining hooks. * langhooks-def.h (lhd_tree_inlining_add_pending_fn_decls, lhd_tree_inlining_anon_aggr_type_p, lhd_tree_inlining_start_inlining, lhd_tree_inlining_end_inlining): Remove prototypes. (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS, LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P, LANG_HOOKS_TREE_INLINING_START_INLINING, LANG_HOOKS_TREE_INLINING_END_INLINING): Remove. * c-objc-common.h (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it. cp/ * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS): Do not set it. (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it. * tree.c (cp_add_pending_fn_decls): Remove. * cp-tree.h (cp_add_pending_fn_decls): Remove prototype. From-SVN: r123658
2007-04-072007-04-07 Daniel Berlin <dberlin@dberlin.org>Daniel Berlin1-0/+2
Revert change removing staticp. From-SVN: r123650
2007-04-07in / 2007-04-06 Daniel Berlin <dberlin@dberlin.org>Daniel Berlin1-2/+0
in / 2007-04-06 Daniel Berlin <dberlin@dberlin.org> * tree.c (staticp): No longer use staticp langhook. * langhooks.c (lhd_staticp): Removed. * langhooks.h (struct lang_hooks): Remove staticp. * c-common.c (c_staticp): Remove. * c-common.h (c_staticp): Ditto. * langhooks-defs.h (lhd_staticp): Ditto. (LHD_HOOKS_STATICP): Ditto * tree.h (gcc_assert_lowered): New macro. in cp/ 2007-04-06 Daniel Berlin <dberlin@dberlin.org> * cp-objcp-common.c (cxx_staticp): Remove. * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove. * cp-tree.h (cxx_staticp): From-SVN: r123636
2006-11-01In gcc/:Geoffrey Keating1-1/+1
* toplev.c (compile_file): Call final_write_globals even if there have been errors. In gcc/cp/: * decl2.c (cp_write_global_declarations): Rename from cp_finish_file. * cp-lang.c (finish_file): Don't call cp_finish_file. * cp-tree.h (cp_write_global_declarations): Rename from cp_finish_file. * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to cp_write_global_declarations. From-SVN: r118362
2006-10-23decl.c: Include langhooks.h.Rafael Ávila de Espíndola1-0/+2
* gcc/java/decl.c: Include langhooks.h. (builtin_function): Remove. (java_init_decl_processing): Replace calls to builtin_function with add_builtin_function. * gcc/java/Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o. (java/decl.o): Depend on langhooks.h. * gcc/java/java-tree.h (builtin_function): Remove. * gcc/tree.c (local_define_builtin): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/objc/objc-act.c (synth_module_prologue): Replace calls to builtin_function with add_builtin_function. (build_next_objc_exception_stuff): Replace calls to builtin_function with add_builtin_function. (build_objc_exception_stuff): Replace calls to builtin_function with add_builtin_function. * gcc/objcp/objcp-decl.h (objcp_builtin_function): Remove. * gcc/cp/decl.c (builtin_function_1): Move common code to add_builtin_function. (builtin_function): Rename to cxx_builtin_function. Change the signature. * gcc/cp/call.c: Include langhooks.h. (build_java_interface_fn_ref): Replace calls to builtin_function with add_builtin_function. * gcc/cp/Make-lang.in (cp/call.o): Depend on langhooks.h. * gcc/cp/cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as cxx_builtin_function. * gcc/cp/cp-tree.h (builtin_function): Rename to cxx_builtin_function. Change the signature. * gcc/c-objc-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as c_builtin_function. * gcc/c-tree.h (builtin_function): Rename to c_builtin_function. Change the signature. * gcc/ada/utils.c (builtin_function): Rename to gnat_builtin_function. Move common code to add_builtin_function. * gcc/ada/misc.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as gnat_builtin_function. * gcc/ada/gigi.h (builtin_function): Rename to gnat_builtin_function. Change the signature. * gcc/c-decl.c (builtin_function): Rename to c_builtin_function. Move common code to add_builtin_function. * gcc/fortran/Make-lang.in (f951$(exeext)): Depend on and link with attribs.o. * gcc/fortran/trans.h (builtin_function): Rename to gfc_builtin_function. Change the signature. * gcc/fortran/f95-lang.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as gfc_builtin_function. (builtin_function): Rename to gfc_builtin_function. Move common code to builtin_function. (gfc_define_builtin): Replace calls to builtin_function with gfc_define_builtin. * gcc/langhooks.c (add_builtin_function): New function. (lhd_builtin_function): New function. * gcc/langhooks.h (struct lang_hooks): Change the signature of builtin_function. (add_builtin_function): New function. * gcc/treelang/treetree.c (builtin_function): Remove. * gcc/tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/c-common.c (decl_builtin_1): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/alpha/alpha.c (alpha_init_builtins): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/frv/frv.c (def_builtin): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/s390/s390.c (s390_init_builtins): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/sparc/sparc.c (def_builtin): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/i386/i386.c (def_builtin): Replace calls to lang_hooks.builtin_function with add_builtin_function. (def_builtin): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/sh/sh.c (sh_media_init_builtins): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/c4x/c4x.c (c4x_init_builtins): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/stormy16/stormy16.c (xstormy16_init_builtins): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/iq2000/iq2000.c (def_builtin): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/ia64/ia64.c (def_builtin): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/rs6000/rs6000.c (def_builtin): Replace calls to lang_hooks.builtin_function with add_builtin_function. (altivec_init_builtins): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/arm/arm.c (def_mbuiltin): Replace calls to lang_hooks.builtin_function with add_builtin_function. (arm_init_tls_builtins): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/mips/mips.c (mips_init_builtins): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/config/bfin/bfin.c (def_builtin): Replace calls to lang_hooks.builtin_function with add_builtin_function. * gcc/langhooks-def.h (lhd_builtin_function): New function. (LANG_HOOKS_BUILTIN_FUNCTION): Define as lhd_builtin_function. From-SVN: r117981
2006-09-11re PR c++/28991 (Static constructor emitted instead of initialized variable)Mark Mitchell1-0/+2
PR c++/28991 * cp-objcp-common.c (cxx_staticp): New function. * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it. * cp-tree.h (cxx_staticp): New function. PR c++/289991 * g++.dg/init/static3.C: New test. From-SVN: r116838
2006-05-02re PR middle-end/27337 (OpenMP ICE in expand_expr_real_1 at expr.c:6814)Jakub Jelinek1-0/+2
PR middle-end/27337 * gimplify.c (gimplify_scan_omp_clauses): Handle INDIRECT_REF around RESULT_DECL for result passed by reference. (gimplify_expr): Call omp_notice_variable when RESULT_DECL is seen. * omp-low.c (use_pointer_for_field): Don't look at DECL_HAS_VALUE_EXPR_P for RESULT_DECLs. (scan_omp_1): Call remap_decl on RESULT_DECLs. (lower_rec_input_clauses): Don't allocate VLA memory for the second time or var for passing by reference for OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE clauses. Allow creation of TREE_ADDRESSABLE variables when passing by reference. * omp-low.c (dump_omp_region): Fix output formatting. cp/ * cp-gimplify.c (cxx_omp_privatize_by_reference): New function. * cp-tree.h (cxx_omp_privatize_by_reference): New prototype. * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define. testsuite/ * g++.dg/gomp/pr27337-1.C: New test. * g++.dg/gomp/pr27337-2.C: New test. libgomp/ * testsuite/libgomp.c++/pr27337.C: New test. From-SVN: r113456
2006-03-09Merge C++ from gomp-20050608-branch.Richard Henderson1-0/+10
From-SVN: r111867
2005-11-21c-common.c, [...]: Revert 2005-11-18 lookup_name patch.Richard Henderson1-2/+0
gcc/ * c-common.c, config/darwin-c.c, c-decl.c, c-tree.h, c-objc-common.h, langhooks-def.h, langhooks.h: Revert 2005-11-18 lookup_name patch. * c-tree.h (lookup_name): Move declaration ... * c-common.h (lookup_name): ... here. * config/darwin-c.c: Include c-common.h. * config/t-darwin: Update dependencies. gcc/cp/ * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch. * name-lookup.c (lookup_name): Remove prefer_type argument. (lookup_name_prefer_type): New. * decl.c (lookup_and_check_tag): Use them. * pt.c (tsubst_friend_class): Likewise. (lookup_template_class): Likewise. (tsubst_copy_and_build): Likewise. * name-lookup.h (lookup_name_prefer_type): New. (lookup_name): Remove declaration. From-SVN: r107325
2005-11-18c-common.c (handle_cleanup_attribute): Use a lang hook for lookup_name.Mike Stump1-0/+2
* c-common.c (handle_cleanup_attribute): Use a lang hook for lookup_name. * config/darwin-c.c (darwin_pragma_unused): Likewise. * c-decl.c (lookup_name_two) Remove. * c-tree.h (lookup_name_two): Remove. * c-objc-common.h (LANG_HOOKS_LOOKUP_NAME): Add. * langhooks-def.h (LANG_HOOKS_LOOKUP_NAME): Add. (LANG_HOOKS_DECLS): Add initializer for LANG_HOOKS_LOOKUP_NAME. * langhooks.h (lang_hooks_for_decls): Add lookup_name. cp: * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add. * name-lookup.c (lookup_name_two): Remove. (lookup_name_one): Add. * name-lookup.h (lookup_name_two): Remove. (lookup_name_one): Add. From-SVN: r107196
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101312
2005-05-17Yet more Objective-C++...Ziemowit Laski1-10/+0
* cp-objcp-common.h (cxx_get_alias_set): Move from here... (cxx_warn_unused_global_decl): Likewise. (cp_expr_size): Likewise. (cp_tree_size): Likewise. (cp_var_mod_type_p): Likewise. (cxx_initialize_diagnostics): Likewise. (cxx_types_compatible_p): Likewise. * cp-tree.h: to here. (do_poplevel): Add. * lex.c (D_OBJC): Add. (init_reswords): Add. * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h. * parser.c: Add c-common.h include. * pt.c: Add c-common.h and cp-objcp-common.h includes. (template_args_equal): Use objc_comptypes as well. (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well. * semantics.c (do_poplevel): Remove static. * decl.c (objc_mark_locals_volatile): Don't change decls that are already ok. * decl2.c (generate_ctor_or_dtor_function): Add code to initialize Objective C++ early enough. * lex.c (struct resword reswords): Add Objective-C++ support. * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++. (cp_parser_objc_message_receiver): Add. (cp_parser_objc_message_args): Likewise. (cp_parser_objc_message_expression): Likewise. (cp_parser_objc_encode_expression): Likewise. (cp_parser_objc_defs_expression): Likewise. (cp_parser_objc_protocol_expression): Likewise. (cp_parser_objc_selector_expression): Likewise. (cp_parser_objc_expression): Likewise. (cp_parser_objc_visibility_spec): Likewise. (cp_parser_objc_method_type): Likewise. (cp_parser_objc_protocol_qualifiers): Likewise. (cp_parser_objc_typename): Likewise. (cp_parser_objc_selector_p): Likewise. (cp_parser_objc_selector): Likewise. (cp_parser_objc_method_keyword_params): Likewise. (cp_parser_objc_method_tail_params_opt): Likewise. (cp_parser_objc_interstitial_code): Likewise. (cp_parser_objc_method_signature): Likewise. (cp_parser_objc_method_prototype_list): Likewise. (cp_parser_objc_method_definition_list): Likewise. (cp_parser_objc_class_ivars): Likewise. (cp_parser_objc_identifier_list): Likewise. (cp_parser_objc_alias_declaration): Likewise. (cp_parser_objc_class_declaration): Likewise. (cp_parser_objc_protocol_declaration): Likewise. (cp_parser_objc_protocol_refs_opt): Likewise. (cp_parser_objc_superclass_or_category): Likewise. (cp_parser_objc_class_interface): Likewise. (cp_parser_objc_class_implementation): Likewise. (cp_parser_objc_end_implementation): Likewise. (cp_parser_objc_declaration): Likewise. (cp_parser_objc_try_catch_finally_statement): Likewise. (cp_parser_objc_synchronized_statement): Likewise. (cp_parser_objc_throw_statement): Likewise. (cp_parser_objc_statement): Likewise. (cp_parser_primary_expression): Add Objective-C++. (cp_parser_statement): Likewise. (cp_parser_declaration): Likewise. (cp_parser_simple_type_specifier): Likewise. (cp_parser_type_name): Likewise. (cp_parser_parameter_declaration_list): Likewise. (cp_parser_member_declaration) Likewise. * tree.c: Include debug.h. * typeck.c (composite_pointer_type): Add Objective-C++ support. (finish_class_member_access_expr): Likewise. (build_function_call): Allow objc to rewrite FUNCTION_DECLs. (build_modify_expr): Allow objc to generate write barriers. * Make-lang.in (cp/tree.o): Add debug.h. * tree.c (lvalue_p_1, case CONST_DECL): Add. From-SVN: r99855
2005-03-23langhooks.h (truthvalue_conversion): Remove.Joseph Myers1-2/+0
* langhooks.h (truthvalue_conversion): Remove. * langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_TRUTHVALUE_CONVERSION. * system.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Poison. * gimplify.c (gimple_boolify): Don't use truthvalue_conversion. * c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove. ada: * misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove. cp: * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove. fortran: * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove. java: * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove. treelang: * treetree.c (LANG_HOOKS_TRUTHVALUE_CONVERSION, tree_lang_truthvalue_conversion): Remove. * tree-convert.c: Don't call truthvalue_conversion. From-SVN: r96947
2005-02-23genpreds.c: Update copyright.Kazu Hirata1-1/+1
gcc/ * genpreds.c: Update copyright. cp/ * cp-objcp-common.h, error.c: Update copyright. fortran/ * intrinsic.h, st.c: Update copyright. treelang/ * parse.y: Update copyright. From-SVN: r95457
2005-02-20re PR middle-end/18785 (isdigit builtin function fails with EBCDIC character ↵Zack Weinberg1-0/+2
sets) PR 18785 libcpp: * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro. (cpp_host_to_exec_charset): New function. * include/cpplib.h: Declare cpp_host_to_exec_charset. gcc: * langhooks.h (struct lang_hooks): Add to_target_charset. * langhooks.c (lhd_to_target_charset): New function. * langhooks-def.h: Declare lhd_to_target_charset. (LANG_HOOKS_TO_TARGET_CHARSET): New macro. (LANG_HOOKS_INITIALIZER): Update. * c-common.c (c_common_to_target_charset): New function. * c-common.h: Declare it. * c-objc-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to c_common_to_target_charset. * defaults.c (TARGET_BELL, TARGET_BS, TARGET_CR, TARGET_DIGIT0) (TARGET_ESC, TARGET_FF, TARGET_NEWLINE, TARGET_TAB, TARGET_VT): Delete definitions. * system.h: Poison them. * doc/tm.texi: Don't discuss them. * builtins.c (fold_builtin_isdigit): Use lang_hooks.to_target_charset. * c-pretty-print.c (pp_c_integer_constant): Don't use pp_c_char. (pp_c_char): Do not attempt to generate letter escapes for newline, tab, etc. * config/arm/arm.c (output_ascii_pseudo_op): Likewise. * config/mips/mips.c (mips_output_ascii): Likewise. gcc/cp: * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to c_common_to_target_charset. Delete bogus comment. gcc/testsuite: * gcc.dg/charset/builtin1.c: New test. From-SVN: r95304
2004-11-02c-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove.Ziemowit Laski1-0/+3
[gcc/ChangeLog] 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. From-SVN: r89997
2004-09-22cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from cp-objcp-common.h.Ziemowit Laski1-3/+1
[gcc/cp/ChangeLog] 2004-09-21 Ziemowit Laski <zlaski@apple.com> * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from cp-objcp-common.h. (objcp_tsubst_copy_and_build): Reformat function signature. * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise. (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c. From-SVN: r87846
2004-09-15configure.ac: Check for COMDAT support.Mark Mitchell1-0/+2
* configure.ac: Check for COMDAT support. Robustify check for SHF_MERGE support. * configure: Regenerated. * config.in: Likewise. * langhooks-def.h (lhd_comdat_group): New function. (LANG_HOOKS_COMDAT_GROUP): New macro. (LANG_HOOKS_DECLS): Use it. * langhooks.c (lhd_comdat_group): Define. * langhooks.h (lang_hooks_for_decls): Add comdat_group. * output.h (named_section_flags): Make it a macro. (named_section_real): New function. (default_no_named_section): Add decl parameter. (default_elf_asm_named_section): Likewise. (default_coff_asm_named_section): Likewise. (default_pe_asm_named_section): Likewise. * target.h (gcc_target): Adjust type of named_section. * varasm.c (named_section_flags): Rename to named_section_real. Add decl parameter. (default_no_named_section): Add decl parameter. (default_elf_asm_named_section): Use COMDAT, if available. Deal with the case that ASM_COMMENT_START is "@". (default_coff_asm_named_section): Add decl parameter. (default_pe_asm_named_section): Likewise. * config/alpha/alpha.c (vms_asm_named_section): Add decl parameter. (unicosmk_asm_named_section): Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Remove. * config/arm/elf.h (TARGET_ASM_NAMED_SECTION): Likewise. * config/c4x/c4x.c (c4x_asm_named_section): Add decl parameter. * config/cris/cris-protos.h (cris_target_asm_named_section): Likewise. * config/cris/cris.c (cris_target_asm_named_section): Likewise. * config/h8300/h8300.c (h8300_asm_named_section): Likewise. * config/i386/i386-protos.h (i386_pe_asm_named_section): Likewise. * config/i386/winnt.c (i386_pe_asm_named_section): Likewise. * config/m68k/m68k.c (m68k_coff_asm_named_section): Likewise. * config/mcore/mcore.c (mcore_asm_named_section): Likewise. * config/rs6000/rs6000.c (rs6000_xcoff_asm_named_section): Likewise. * config/sparc/sparc.c (sparce_elf_asm_named_section): Likewise. * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define. * cp-tree.h (cxx_comdat_group): Declare. * decl.c (cxx_comdat_group): New function. From-SVN: r87557
2004-08-31Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.Ziemowit Laski1-0/+162
2004-08-31 Ziemowit Laski <zlaski@apple.com> * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o. (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h. (cp/cp-decl.c): Do not depend on gtype-cp.h. (cp/cp-objcp-common.o): New target. * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h. (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size, cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c, respectively. (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH, LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS, LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION, LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE, LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS, LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL, LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P, LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES, LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS, LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P, LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P, LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P, LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN, LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE, LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR, LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE, 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_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move hooks to cp-objcp-common.h. (finish_file): New function. * cp-objcp-common.c: New file. * cp-objcp-common.h: New file. * cp-tree.h (cp_finish_file): New prototype. * decl.c: Do not include gtype-cp.h. * decl2.c (finish_file): Rename to cp_finish_file. From-SVN: r86837