Age | Commit message (Collapse) | Author | Files | Lines |
|
* diagnostic-core.h: Include bversion.h.
* toplev.h: Don't include input.h or bversion.h.
(parse_optimize_options): Don't declare here.
* alias.c, auto-inc-dec.c, c-aux-info.c, c-convert.c, c-parser.c,
caller-save.c, cfg.c, cfganal.c, cfgbuild.c, cfgcleanup.c,
combine-stack-adj.c, config/arm/pe.c, config/darwin-c.c,
config/host-darwin.c, config/i386/host-cygwin.c,
config/i386/host-mingw32.c, config/i386/msformat-c.c,
config/i386/netware.c, config/i386/nwld.c,
config/i386/winnt-cxx.c, config/i386/winnt-stubs.c,
config/ia64/ia64-c.c, config/m32c/m32c-pragma.c,
config/mep/mep-pragma.c, config/microblaze/microblaze-c.c,
config/rs6000/host-darwin.c, config/rs6000/rs6000-c.c,
config/score/score3.c, config/score/score7.c,
config/sh/symbian-base.c, config/sh/symbian-c.c,
config/sh/symbian-cxx.c, config/sol2-c.c, config/sol2.c,
config/v850/v850-c.c, config/vxworks.c, convert.c, cppbuiltin.c,
cselib.c, dbgcnt.c, ddg.c, dfp.c, dominance.c, emit-rtl.c,
fixed-value.c, fwprop.c, ggc-common.c, gimple.c, gimplify.c,
graphite-blocking.c, graphite-clast-to-gimple.c,
graphite-dependences.c, graphite-flattening.c,
graphite-interchange.c, graphite-poly.c,
graphite-scop-detection.c, graphite.c, haifa-sched.c,
implicit-zee.c, integrate.c, ipa-pure-const.c, ipa-reference.c,
ira-build.c, ira-conflicts.c, ira-costs.c, ira-lives.c, jump.c,
lists.c, loop-doloop.c, loop-iv.c, lto-cgraph.c, lto-compress.c,
lto-opts.c, lto-section-in.c, lto-section-out.c,
lto-streamer-out.c, lto-symtab.c, modulo-sched.c, optabs.c,
params.c, postreload-gcse.c, postreload.c, predict.c, profile.c,
regcprop.c, reginfo.c, regmove.c, reorg.c, resource.c,
sched-deps.c, sched-ebb.c, sched-rgn.c, sdbout.c,
sel-sched-dump.c, sel-sched-ir.c, sese.c, stmt.c, targhooks.c,
tree-cfgcleanup.c, tree-mudflap.c, tree-nomudflap.c,
tree-object-size.c, tree-outof-ssa.c, tree-phinodes.c,
tree-profile.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c,
tree-ssa-live.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c,
tree-ssa-operands.c, tree-ssa-structalias.c, tree-ssa-uninit.c,
tree-vect-patterns.c, value-prof.c, var-tracking.c, web.c: Don't
include toplev.h.
* Makefile.in (TOPLEV_H): Remove. All uses changed to use
toplev.h. Dependencies for above files and c-family files changed
to remove $(TOPLEV_H) or toplev.h.
(C_TREE_H): Don't include $(TOPLEV_H).
(DIAGNOSTIC_CORE_H): Use $(INPUT_H) instead of input.h. Add
bversion.h.
* config/arm/t-pe, config/arm/t-wince-pe, config/i386/t-cygming,
config/ia64/t-ia64, config/mep/t-mep, config/score/t-score-elf,
config/t-darwin, config/t-sol2,
config/t-vxworks, config/v850/t-v850, config/v850/t-v850e:
Dependencies for above files changed to remove $(TOPLEV_H) or
toplev.h.
c-family:
* c-common.h (parse_optimize_options): Declare.
* c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
cp:
* cp-gimplify.c, cp-lang.c, cvt.c, cxx-pretty-print.c, error.c,
except.c, expr.c, friend.c, init.c, mangle.c, name-lookup.c,
optimize.c, parser.c, rtti.c, tree.c, typeck2.c: Don't include
toplev.h.
* Make-lang.in: Dependencies for above files changed to remove
toplev.h.
java:
* expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
verify-glue.c: Don't include toplev.h.
* Make-lang.in: Dependencies for above files changed to remove
toplev.h.
lto:
* Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
$(TOPLEV_H).
From-SVN: r167293
|
|
gcc/ChangeLog:
2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
* system.h: Poison GCC_EXCEPT_H for front-end files.
* langhooks.h (struct lang_hooks): Add eh_protect_cleanup_actions
langhook.
* langhooks-def.h (LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS) New.
Define to NULL by default.
* except.h: Define GCC_EXCEPT_H.
(doing_eh): Remove prototype.
(init_eh, init_eh_for_function): Move prototypes to toplev.h.
(lang_protect_cleanup_actions): Remove.
* except.c (lang_protect_cleanup_actions): Remove.
(doing_eh): Remove.
(gen_eh_region): Don't check doing_eh here.
* toplev.h (init_eh, init_eh_for_function_): Moved from except.h.
* tree-eh.c (honor_protect_cleanup_actions): Use new langhook
instead of lang_protect_cleanup_actions.
* omp-low.c (maybe_catch_exception): Likewise.
* Makefile.in: Update dependencies.
gcc/c-family/ChangeLog:
2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
* c-cppbuiltin.c: Do not include except.h.
gcc/objc/ChangeLog:
2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
* objc-act.c: Do not include except.h.
gcc/cp/ChangeLog:
2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
* init.c: Do not include except.h.
* decl.c: Likewise.
* expr.c: Likewise.
* cp-lang.c: Likewise.
* pt.c: Likewise.
* semantics.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
(init_exception_processing): Do not set the removed
lang_protect_cleanup_actions here.
(cp_protect_cleanup_actions): Make non-static and remove prototype.
(doing_eh): New, moved from except.c but removed the do_warning flag.
(expand_start_catch_block): Update doing_eh call.
(expand_end_catch_block): Likewise.
(build_throw): Likewise.
* cp-tree.h: Prototype cp_protect_cleanup_actions.
* cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
cp_protect_cleanup_actions.
* Make-lang.in: Update dependencies.
gcc/objcp/ChangeLog:
2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
* objcp-lang.c: Do not include except.h.
* Make-lang.in: Update dependencies.
gcc/java/ChangeLog:
2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
* lang.c: Do not include except.h
* except.c: Likewise.
(doing_eh): New, moved from except.c (in gcc/) but removed the
do_warning flag.
(maybe_start_try): Update doing_eh call.
* Make-lang.in: Update dependencies.
gcc/ada/ChangeLog:
2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
* gcc-interface/misc.c: Do not include except.h.
* gcc-interface/Make-lang.in: Update dependencies.
gcc/fortran/ChangeLog:
2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
* Make-lang.in: Update dependencies.
From-SVN: r161484
|
|
PR c++/44444
* expr.c (mark_exp_read): Handle INDIRECT_REF.
* cvt.c (convert_to_void): Handle INDIRECT_REF like
handled_component_p.
* g++.dg/warn/Wunused-var-12.C: New test.
From-SVN: r160388
|
|
gcc/ChangeLog:
* Makefile.in (EXCEPT_H): Fix typo.
objc/ChangeLog:
* objc-act.h: Do not include gimple.h.
* objc-act.c: Do not include rtl.h, expr.h, libfuncs.h, and tm_p.h.
Include gimple.h. Explain why except.h has to be included.
* objc-lang.c: Do not include diagnostics.h.
* Make-lang.in: Update dependencies.
objcp/ChangeLog:
* objcp-decl.c: Do not include tm.h, rtl.h, expr.h, c-common.h,
flags.h, input.h, except.h, output.h, toplev.h, cpplib.h, debug.h,
and target.h.
* objcp-lang.c: Do not include tm.h, toplev.h, diagnostics.h,
and debug.h. Explain why except.h has to be included.
* Make-lang.in: Update dependencies.
cp/ChangeLog:
* cp-tree.h: Do not include splay-tree.h.
(struct prtmem_cst): Remove unused field and false comment.
* typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
* optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
* init.c: Do not include rtl.h and expr.h.
* class.c: Do not include rtl.h. Include splay-tree.h.
(build_clone): Use plain NULL instead of NULL_RTX.
* decl.c: Do not include expr.h. Explain why rtl.h has to be
included. Include splay-tree.h.
* method.c: Do not include rtl.h and expr.h.
(use_thunk): Use plain NULL instead of NULL_RTX.
* except.c: Do not include rtl.h, expr.h, and libfuncs.h.
* tree.c: Do not include rtl.h, insn-config.h, integrate.h,
and target.h. Include splay-tree.h.
* expr.c: Do not include rtl.h and expr.h.
* pt.c: Do not include obstack.h and rtl.h.
(tsubst_friend_function): Use plain NULL instead of NULL_RTX.
(tsubst_decl): Likewise.
(instantiate_decl): Likewise.
* semantics.c: Do not include exprt.h and debug.h. Explain why
rtl.h has to be included.
* decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
* call.c: Do not include rtl.h and expr.h.
* search.c: Do not include obstack.h and rtl.h.
* friend.c: Do not include rtl.h and expr.h.
* Make-lang.in: Update dependencies.
From-SVN: r159839
|
|
gcc/cp/ChangeLog:
PR 18624
* cp-tree.h (mark_exp_read, mark_rvalue_use, mark_lvalue_use,
mark_type_use): Declare ...
* expr.c (mark_exp_read, mark_rvalue_use, mark_lvalue_use,
mark_type_use): ... new fns.
* typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call mark_type_use.
(perform_integral_promotions): Call mark_rvalue_use.
(cp_build_unary_op): Call mark_lvalue_use.
(decay_conversion): Update comment. Call mark_lvalue.
* decl.c (unused_but_set_errorcount): New variable.
(poplevel): Issue -Wunused-but-set-variable diagnostics.
(duplicate_decls): Merge DECL_READ_P flags.
(start_cleanup_fn): Set DECL_READ_P flag.
(finish_function): Issue -Wunused-but-set-parameter diagnostics.
* tree.c (rvalue): Call mark_rvalue_use.
* pt.c (convert_nontype_argument): Likewise.
* semantics.c (finish_typeof, finish_decltype_type): Call
mark_type_use.
(finish_asm_stmt): Call mark_lvalue_use.
(finish_expr_stmt): Call mark_exp_read.
* call.c (convert_like_real) <ck_identity, ck_user>: Call
mark_rvalue_use.
(build_x_va_arg): Call mark_lvalue_use.
(build_over_call): Call mark_type_use.
* init.c (build_new, build_delete): Call mark_value_use.
* rtti.c (build_typeid): Call mark_lvalue_use or mark_type_use.
(build_dynamic_cast_1): call mark_lvalue_use or mark_rvalue_use.
gcc/testsuite/ChangeLog:
PR 18624
* g++.dg/warn/Wunused-7.C: Add dg-warning.
* g++.dg/template/sfinae16.C: Likewise.
* gcc.dg/Wunused-var-1.c: Moved to...
* c-c++-common/Wunused-var-1.c: ...here. New test.
* gcc.dg/Wunused-var-2.c: Moved to...
* c-c++-common/Wunused-var-2.c: ...here. New test.
* gcc.dg/Wunused-var-3.c: Moved to...
* c-c++-common/Wunused-var-3.c: ...here. New test.
* gcc.dg/Wunused-var-4.c: Moved to...
* gcc.dg/Wunused-var-1.c: ... here.
* gcc.dg/Wunused-var-5.c: Moved to...
* c-c++-common/Wunused-var-4.c: ...here. New test.
* gcc.dg/Wunused-var-7.c: Moved to...
* c-c++-common/Wunused-var-5.c: ...here. New test.
* gcc.dg/Wunused-var-6.c: Moved to...
* gcc.dg/Wunused-var-2.c: ... here.
* c-c++-common/Wunused-var-1.c: New test.
* c-c++-common/Wunused-var-2.c: New test.
* c-c++-common/Wunused-var-3.c: New test.
* c-c++-common/Wunused-var-4.c: New test.
* c-c++-common/Wunused-var-5.c: New test.
* g++.dg/warn/Wunused-var-1.C: New test.
* g++.dg/warn/Wunused-var-2.C: New test.
* g++.dg/warn/Wunused-var-3.C: New test.
* g++.dg/warn/Wunused-var-4.C: New test.
* g++.dg/warn/Wunused-var-5.C: New test.
* g++.dg/warn/Wunused-var-6.C: New test.
* g++.dg/warn/Wunused-var-7.C: New test.
* g++.dg/warn/Wunused-var-8.C: New test.
* g++.dg/warn/Wunused-parm-1.C: New test.
* g++.dg/warn/Wunused-parm-2.C: New test.
* g++.dg/warn/Wunused-parm-3.C: New test.
Co-Authored-By: Dodji Seketeli <dodji@redhat.com>
From-SVN: r159096
|
|
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
|
|
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-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
|
|
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
|
|
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
|
|
From-SVN: r108193
|
|
From-SVN: r101312
|
|
From-SVN: r100952
|
|
PR c++/15471
* typeck.c (unary_complex_lvalue): Use context_for_name_lookup
when determining the scope to use for a pointer to member.
(lookup_anon_field): Give it external linkage.
* cp-tree.h (lookup_anon_field): Declare it.
* expr.c (cplus_expand_constant): Use it.
From-SVN: r82401
|
|
From-SVN: r81764
|
|
* Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
init.c, mangle.c, typeck.c: Update copyright.
From-SVN: r76304
|
|
* expr.h (expand_expr): Make it a macro, not a function.
(expand_expr_real): New function.
* expr.c (store_expr): Adjust logic for deciding whether or not to
copy the value returned by expand_expr.
(expand_expr): Rename to ...
(expand_expr_real): ... this. Add alt_rtl parameter. Adjust
calls to language hooks.
* c-common.h (c_expand_expr): Adjust prototype.
* c-common.c (c_expand_expr): Add alt_rtl parameter.
* langhooks-def.h (lhd_expand_expr): Change prototype.
* langhooks.c (lhd_expand_expr): Add all_rtl parameter.
* langhooks.h (lang_hooks): Change type of expand_expr.
* stmt.c (stmt_status): Add x_last_expr_alt_rtl.
(last_expr_alt_rtl): Likewise.
(expand_expr_stmt_value): Set last_expr_alt_rtl.
(clear_last_expr): Clear it.
(expand_end_stmt_expr): Set RTL_EXPR_ATL_RTL.
(expand_end_bindings): Save and restor last_expr_alt_rtl.
* tree.def (RTL_EXPR): Give it an additional operand.
* tree.h (RTL_EXPR_ALT_RTL): New macro.
* misc.c (gnat_expand_expr): Add alt_rtl parameter.
* cp-tree.h (cxx_expand_expr): Change prototype.
* expr.c (cxx_expand_expr): Add alt_rtl parameter.
* java-tree.h (java_expand_expr): Change prototype.
* expr.c (java_expand_expr): Add alt_rtl parameter.
From-SVN: r75594
|
|
local...
* cvt.c: Remove uses of "register" specifier in
declarations of arguments and local variables.
* decl.c: Likewise.
* decl2.c: Likewise.
* expr.c: Likewise.
* friend.c: Likewise.
* lex.c: Likewise.
* name-lookup.c: Likewise.
* repo.c: Likewise.
* search.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
From-SVN: r74855
|
|
* fold-const.c (force_fit_type): Handle OFFSET_TYPE.
* varasam.c (output_constant): Likewise.
2003-07-22 Mark Mitchell <mark@codesourcery.com>
Eliminate use of POINTER_TYPE for pointers-to-members.
* call.c (standard_conversion): Rework pointer-to-member handling.
Add comments.
(add_builtin_candidate): Likewise.
(resolve_scoped_fn_name): Remove.
(build_conditional_expr): Rework pointer-to-member handling.
(compare_ics): Likewise.
* class.c (check_field_decls): Use TYPE_PTR_P.
* cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
handling.
* cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
(TYPE_PTRMEM_P): Add comment.
(TYPE_PTR_P): Simplify.
(TYPE_PTROB_P): Correct definition.
(TYPE_PTR_TO_MEMBER_P): New macro.
(TYPE_PTRMEM_CLASS_TYPE): Adjust.
(TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
(resolved_scoped_fn_name): Remove declaration.
(build_offset_ref): Change prototype.
(resolve_offset_ref): Remove.
(comp_target_types): Remove.
* cvt.c (cp_convert_to_pointer): Rework pointer-to-member
handling.
(convert_to_reference): Use can_convert.
(ocp_convert): Improve error handling. Rework pointer-to-member
handling.
(perform_qualification_conversions): Rework pointer-to-member
handling.
* decl.c (build_ptrmem_type): Handle functions too.
(create_array_type_for_decl): Remove OFFSET_TYPE error message.
(grokdeclarator): Use OFFSET_TYPE for pointers to data members.
(grokparms): Remove OFFSET_TYPE error message.
* dump.c (cp_dump_tree): Rework pointer-to-member handling.
* error.c (dump_type_prefix): Likewise.
* expr.c (cplus_expand_constant): Use build_nop.
* init.c (build_offset_ref): Add address_p parameter. Fold in
necessary bits from resolve_offset_ref.
(resolve_offset_ref): Remove.
* parser.c (cp_parser_postfix_expression): Remove special case
code for OFFSET_TYPE.
* pt.c (convert_nontype_argument): Rework pointer-to-member
handling.
(convert_template_argument): Likewise.
(unify): Likewise.
(invalid_nontype_parm_type_p): Likewise.
(dependent_type_p_r): Likewise.
* rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
(target_incomplete_p_): Rework pointer-to-member
handling.
(get_pseudo_ti_init): Likewise.
(get_pseudo_ti_desc): Likewise.
* semantics.c (finish_qualified_id_expr): Adjust call to
build_offset_ref. Remove use of resolve_offset_ref.
* tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
* typeck.c (target_type): Use TYPE_PTRMEM_P.
(type_unknown_p): Remove obsolete code about the time before
non-dependent expressions were handled correctly.
(qualify_type_recursive): Remove.
(composite_pointer_type_r): New function.
(composite_pointer_type): Use it.
(merge_types): Remove dead comments.
(comp_cv_target_types): Remove.
(comp_target_types): Likewise.
(comp_target_parms): Likewise.
(cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
(build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
(build_binary_op): Do not use of comp_target_types.
(pointer_diff): Remove OFFSET_TYPE case.
(build_unary_op): Adjust pointer-to-member handling.
(unary_complex_lvalue): Likewise.
(check_for_casting_away_constness): Add description parameter.
(build_static_cast): Pass it.
(build_reinterpret_cast): Use check_for_casting_away_constness.
(build_const_cast): Adjust pointer-to-member handling.
(build_c_cast): Likewise.
(convert_for_assignment): Remove OFFSET_TYPE error message.
(comp_ptr_ttypes_real): Adjust pointer-to-member handling.
(comp_ptr_ttypes_reinterpret): Remove.
(casts_away_constness_r): Adjust pointer-to-member handling.
(casts_away_constness): Liekwise.
(strip_all_pointer_quals): Remove.
* typeck2.c (digest_init): Adjust pointer-to-member handling.
(build_m_component_ref): Likewise.
From-SVN: r69691
|
|
PR c++/7050
* expr.c (store_expr): Don't attempt to store void-typed trees,
just evaluate them for side effects.
* cp/expr.c (cxx_expand_expr): Return const0_rtx for throw
expressions.
From-SVN: r64268
|
|
* expr.c (cplus_expand_constant): Use C90 prototype style.
(cxx_expand_expr): Likewise.
From-SVN: r64064
|
|
2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
* cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
cp/lang-options.h, cp/lang-specs.h, cp/lex.h,
cp/ptree.c, cp/repo.c,
java/jcf-reader.c, java/jvgenmain.c,
java/keyword.gperf, java/lang-options.h,
java/mangle.c, java/mangle_name.c,
java/xref.c, java/zextract.c,java/zipfile.h,
objc/Make-lang.in, objc/config-lang.in,
objc/lang-specs.h, objc/objc-act.h: Fix
Copyright years.
From-SVN: r60783
|
|
* call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
copyright header.
* lex.h: parse.y is dead, so don't mention it. Also replace the
copyright header with the default GNU copyright header.
From-SVN: r60738
|
|
* Make-lang.in (po-generated): Remove parse.c.
(CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
($(srcdir)/cp/parse.h): Remove target.
($(srcdir)/cp/parse.c): Likewise.
(gt-cp-parse.h): Likewise.
(gt-cp-parser.h): New target.
(c++.distclean): Do not remove parse.output.
(c++.maintainer-clean): Do not remove parse.c or parse.h.
(cp/spew.o): Remove target.
(cp/lex.o): Adjust dependencies.
(cp/pt.o): Likewise.
(cp/parse.o): Likewise.
(cp/TAGS): Do not mention parse.c.
(cp/parser.o): New target.
* NEWS: Mention the new parser.
* call.c (build_scoped_method_call): Simplify.
(build_method_call): Likewise.
(build_new_function_call): Adjust calls to add_function_candidate
and add_template_candidate.
(build_new_op): Improve handling of erroroneous operands.
(convert_default_arg): Remove circular argument processing.
(name_as_c_string): New function.
(build_new_method_call): Use it.
(perform_implicit_conversion): Use error_operand_p.
* class.c (finish_struct_anon): Use constructor_name_p.
(check_field_decls): Likewise.
(pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
(resolve_address_of_overloaded_function): Likewise.
(instantiate_type): Tweak pointer-to-member handling.
(get_primary_binfo): Remove incorrect assertion.
* config-lang.in (gtfiles): Add parser.c, remove parse.c.
* cp-tree.h (DEFARG_TOKENS): New macro.
(default_arg): New structure.
(cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
(lang_tree_node): Add default_arg.
(cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
(type_info_ref_type): New macro.
(saved_scope): Make processing_explicit_instantiation a boolean.
(check_access): New field.
(unparsed_text): Remove.
(language_function): Remove unparsed_inlines.
(error_operand_p): New macro.
(lang_decl): Adjust pending_inline_info.
(DEFARG_POINTER): Remove.
(tag_types): Add typenames.
(lookup_ualified_name): Declare.
(lookup_name_real): Likewise.
(shadow_tag): Adjust prototype.
(get_scope_of_declarator): Declare it.
(process_next_inline): Remove it.
(check_for_missing_semicolon): Likewise.
(maybe_get_template_decl_from_type_decl): Declare it.
(finish_label_stmt): Adjust prototype.
(finish_non_static_data_meber): Declare it.
(finish_pseudo_destructor_call_expr): Rename to ...
(finish_pseudo_destructor_expr): ... this.
(finish_compound_literal): Declare it.
(begin_inline_definitions): Remove it.
(init_spew): Remove.
(peekyylex): Likewise.
(arbitrate_lookup): Likewise.
(frob_opname): Likewise.
(maybe_snarf_defarg): Likewise.
(add_defarg_fn): Likewise.
(do_pending_defargs): Likewise.
(done_pending_defargs): Likewise.
(unprocessed_defarg_fn): Likewise.
(replace_defarg): Likewise.
(end_input): Likewise.
(get_overloaded_fn): Likewise.
* cvt.c (convert_to_reference): Improve error handling.
* decl.c (lookup_name_real): Do not declare it static.
(maybe_push_to_top_level): Set check_access.
(identifier_type_value): Adjust call to lookup_name_real.
(lookup_qualified_name): New method.
(lookup_name_real): Remove special-case parsing code.
(lookup_name-nonclass): Adjust call to lookup_name_real.
(lookup_name_namespace_only): Likewise.
(lookup_name): Likewise.
(check_tag_decl): Return the type declared.
(shadow_tag): Likewise.
(register_dtor_fn): Tweak check_access.
(grokfndecl): Use constructor_name_p.
(get_scope_of_declarator): New function.
(grokdeclarator): Obscure tweaks for slightly different declarator
representations.
(start_method): Return error_mark_node to indicate failure.
(cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
* decl2.c (constructor_name_full): Simplify.
(constructor_name): Use it.
(build_expr_from_tree): Adjust for changes to do new parser.
(push_scope): Improve robustness.
(validate_nonmember_using_decl): Process declarations, not names.
(do_class_using_decl): Likewise.
(handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
here.
* error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
* expr.c (cxx_expand_expr): Handle BASELINKs.
* init.c (member_init_ok_or_else): Issue more errors.
(build_offset_ref): Tweak handling of FUNCTION_DECLs.
* lex.c: Do not include parse.h.
(yypring): Do not declare.
(yylval): Likewise.
(make_reference_declarator): Remove error-generating code.
(rid_to_yy): Remove.
(cxx_init): Do not call init_spew.
(yypring): Remove.
(check_for_missing_semicolon): Remove.
* lex.h (got_scope): Remove.
(got_object): Remove.
* method.c (hack_identifier): Use finish_non_static_data_member.
(implicitly_declare_fn): Adjust use of constructor_name.
* parser.c: New file.
* pt.c (parse.h): Do not include it.
(maybe_get_template_decl_from_template): Do not declare it.
(finish_member_template_decl): Tweak.
(begin_explicit_instantiation): Adjust for
processing_explicit_instantiation being boolean.
(end_explicit_instantiation): Likewise.
(maybe_process_partial_specialization): Tighten specialization
test.
(retrieve_local_specialization): Adjust ue of hash table.
(eq_local_specializations): New function.
(register_local_specialization): Likewise.
(push_template_decl_real): Remove unnecessary test.
(maybe_get_template_decl_from_type_decl): Don't make it static.
(for_each_template_parm_r): Handle TYPEOF_TYPE.
(tsubst_copy): Use retrieive_local_specialization to handle
PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
Handle COMPONENT_REFs with pseudo-destructor-expressions.
Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
(tsubst_expr): Pass decls, not names, to do_local_using_decl.
(unify): Tweak handling of CONST_DECLs.
(regenerate_decl_from_template): Use push_nested_class.
(template_for_substitution): New funciton.
(instantiate_decl): Use it. Register parameters as local
specializations.
* rtti.c (init_rtti_processing): Set type_info_ref_type.
(build_typeid): Use it.
(get_typeid): Likeise.
* search.c (accessible_p): Use check_access, not
flag_access_control.
(adjust_result_of_qualified_name_lookup): Pay attention to the
context_class.
* semantics.c (finish_asm_stmt): Adjust error handling.
(finish_label_stmt): Return the statement.
(finish_non_static_data_member): New function.
(finish_class_expr): Handle BASELINKs.
(finish_call_expr): Handle PSEUDO_DTOR_EXPR.
(finish_object_call_expr): Simplify handling during templates.
(finish_pseudo_destructor_call_expr): Rename to ...
(finish_pseudo_dtor_expr): ... this.
(finish_compound_literal): New function.
(begin_inline_definitions): Remove.
(finish_sizeof): Remove special template handling.
* spew.c: Do not include parse.h.
* tree.c (get_overloaded_fn): Remove.
* typeck.c (build_class_member_access_expr): Handle
PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
(lookup_destructor): New function.
(finish_class_member_access_expr): Use it.
(convert_arguments): Simplify.
(build_unary_op): Handle BASELINKs.
From-SVN: r60560
|
|
From-SVN: r60174
|
|
* store-layout.c (finish_record_layout): Add free_p parameter.
(layout_type): Pass it.
* tree.h (finish_record_layout): Update prototype.
* class.c (walk_subobject_offsets): Correct the calculation of
offsets for virtual bases. Correct the counting of array
elements.
(layout_nonempty_base_or_field): Simplify. Correct the
calculation of offsets to be propagated through the binfo
hierarchy.
(build_base_field): Avoid creating a FIELD_DECL for empty bases.
Add the FIELD_DECL to TYPE_FIELDS.
(build_base_fields): Adjust accordingly.
(layout_virtual_bases): Use build_base_field.
(end_of_class): Return a tree, not an integer.
(warn_about_ambiguous_direct_bases): Rename to ...
(warn_about_ambiguous_bases): ... this.
(include_empty_classes): New function.
(layout_class_type): Create an alternative version of the type to
be used when as a base class type. Do not call
finish_record_layout until we are done laying out the class.
* cp-tree.h (lang_type_class): Remove size, size_unit. Add
as_base.
(CLASSTYPE_SIZE): Reimplement.
(CLASSTYPE_SIZE_UNIT): Likewise.
(CLASSTYPE_ALIGN): Likweise.
(CLASSTYPE_USER_ALIGN): Likewise.
(CLASSTYPE_AS_BASE): New macro.
(DECL_INITIALIZED_P): Likewise.
(extract_init): Remove prototype.
(build_forced_zero_init): Rename to ...
(build_zero_init): ... this.
(force_store_init_value): Remove.
* decl.c (obscure_complex_init): Remove.
(duplicate_decls): Copy DECL_INITIALIZED_P.
(check_initializer): Do not leave junk in DECL_INITIAL.
(cp_finish_decl): Handle zero-initialization of entities with
static storage duration.
* expr.c (extract_init): Remove.
* init.c (build_forced_zero_init): Remove.
(build_zero_init): New function.
(build_default_init): Use it.
(build_field_list): Skip FIELD_DECLs for base subobjects.
(push_base_cleanups): Likewise.
* method.c (do_build_assign_ref): Likewise.
(synthesize_exception_spec): Likewise.
* pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
(regenerate_decl_from_template): To not set DECL_INITIAL for a
static data member whose initialization took place in its class.
(instantiate_decl): Do not pass an initializer to cp_finish_decl
in that situation.
* search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
(dfs_unuse_fields): Likewise.
* tree.c (pod_type_p): Handle error_mark_node.
(zero_init_p): Likewise.
* typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
subobjects.
* typeck2.c (store_init_value): Remove #if 0'd code.
(force_store_init_value): Remove.
(process_init_constructor): Use build_zero_init.
* g++.dg/abi/empty7.C: New test.
* g++.dg/init/pm2.C: Likewise.
From-SVN: r57654
|
|
* error.c: Fix comment formatting.
* except.c: Likewise.
* expr.c: Likewise.
* friend.c: Likewise.
* g++spec.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* mangle.c: Likewise.
* method.c: Likewise.
* optimize.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* spew.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
From-SVN: r57138
|
|
* c-common.c (c_expand_expr): Fix prototype.
* c-common.h (c_expand_expr): Always declare, update.
* c-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
* c-objc-common.c (c_objc_common_init): No global hook.
* expr.c (expand_expr): Use langhook.
* expr.h (enum expand_modifier): Conditionally declare.
* langhooks-def.h (lhd_expand_expr, LANG_HOOKS_EXPAND_EXPR): New.
(LANG_HOOKS_INITIALIZER): Update.
* langhooks.c (lhd_expand_expr): New.
* langhooks.h (struct lang_hooks): New hook.
* toplev.c (lang_expand_expr_t, lang_expand_expr): Delete.
(lang_independent_init): Don't default hook.
ada:
* misc.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
(gnat_init): Don't set hook.
(gnat_expand_expr): Fix prototype.
cp:
* cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
* cp-tree.h (init_cplus_expand): Remove.
(cxx_expand_expr): New.
* expr.c (cplus_expand_expr): Rename cxx_expand_expr,
fix prototype.
(init_cplus_expand): Remove.
* lex.c (cxx_init): Don't call init_cplus_expand.
java:
* expr.c (java_lang_expand_expr): Rename java_expand_expr,
fix prototype.
* java-tree.h (java_lang_expand_expr): Similarly.
* lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
(java_init): Don't set hook.
objc:
* objc-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
From-SVN: r51462
|
|
2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
* call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
Change my_fancy_abort() to abort().
From-SVN: r49139
|
|
* Makefile.in (c-lang.o): Depends on langhooks-def.h.
(expr.o, varasm.o): Depends on langhooks.h.
* c-common.c (c_safe_from_p): Always declare.
(c_expand_expr): Refine when declared.
* c-lang.c (c-common.h): Now include.
(LANG_HOOKS_SAFE_FROM_P): Define new hook.
(c_init): Don't set lang_safe_from_expr.
* expr.c (langhooks.h): Now include.
(lang_safe_from_p): No longer define.
(safe_from_p): Use lang hook.
(expand_expr): Set IGNORE if VOID_TYPE result of VIEW_CONVERT_EXPR too.
(expand_expr, case VIEW_CONVERT_EXPR): Pass ro_modifier down.
* expr.h (lang_expand_constant, lang_safe_from_p): Delete.
* langhooks-def.h (lhd_return_tree, lhd_safe_from_p): New decls.
(LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
* langhooks.c (lhd_return_tree, lhd_safe_from_p): New functions.
* langhooks.h (struct lang_hooks): New fields expand_constant
and safe_from_p.
* output.h (output_constant): Size arg is HOST_WIDE_INT.
* stmt.c (expand_decl_init): No longer need to expand constant
for CONST_DECL.
* stor-layout.c (put_pending_size): Don't check for SAVE_EXPR.
* toplev.c (lang_expand_constant): Delete var.
* tree.c (save_expr): Don't put another SAVE_EXPR around simple
operations on SAVE_EXPR.
* varasm.c (langhooks.h): Now include.
(compare_constant_1): Use lang_hooks, not lang_expand_constant.
(record_constant_1, output_addressed_constants): Likewise.
(initializer_constant_valid_p, output_constant): Likewise.
(output_constant_def): Process no-defer of string constant.
(output_addressed_constants, case ADDR_EXPR): Use handled_component_p.
(output_constant): Strip more conversions.
Track our size and pad for the rest.
(array_size_for_constructor): Remove code for non-byte STRING_CST.
(output_constructor): SIZE now HOST_WIDE_INT.
* cp/Make-lang.in (cp-lang.o): Depends on c-common.h.
* cp/cp-lang.c (c-common.h): Include.
(LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
* cp/decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
* cp/expr.c (init_cplus_expand): Don't set lang_expand_constant.
From-SVN: r47376
|
|
cp/init.c:1963)
cp:
PR c++/3543
* typeck.c (condition_conversion): Resolve an OFFSET_REF.
* expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
testsuite:
* g++.old-deja/g++.other/optimize4.C: New test.
From-SVN: r44340
|
|
From-SVN: r41988
|
|
* cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
(pfn_vflag_identifier): Define.
Update comment about layout of pointer functions.
(build_ptrmemfunc1): Update prototype.
(expand_ptrmemfunc_cst): Update prototype.
* decl.c (initialize_predefined_identifiers): Initialize
pfn_vflag_identifier.
(build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
an extra field to the type.
* expr.c (cplus_expand_constant): Pass 'flag' between
expand_ptrmemfunc_cst and build_ptrmemfunc1.
* typeck.c (get_member_function_from_ptrfunc): When
FUNCTION_BOUNDARY < 16, look at additional field to determine
if a pointer-to-member is a real pointer or a vtable offset.
(build_ptrmemfunc1): Add new parameter to contain extra field.
(build_ptrmemfunc): Pass the extra field around.
(expand_ptrmemfunc_cst): Add new parameter to return extra field.
(pfn_from_ptrmemfunc): Ignore the extra field.
From-SVN: r41824
|
|
* cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
(expand_ptremfunc_cst): Change prototype.
(delta2_from_ptrmemfunc): Remove.
* expr.c (cplus_expand_constant): Adjust call to
expand_ptrmemfunc_cst.
* typeck.c (build_ptrmemfunc1): Simplify.
(build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
results in a constant.
(expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
(delta2_from_ptrmemfunc): Remove.
(pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
From-SVN: r41341
|
|
From-SVN: r40924
|
|
From-SVN: r39599
|
|
From-SVN: r38787
|
|
* cp/cp-tree.h (struct cp_language_function): Remove x_result_rtx.
(original_result_rtx): Remove.
* cp/decl.c (save_function_data): Don't clear x_result_rtx.
(mark_lang_function): Don't mark it either.
* cp/expr.c (fixup_result_decl): Remove.
* cp/semantics.c (genrtl_named_return_value): Frob the return decl
before calling emit_local_var.
(genrtl_finish_function): Don't call fixup_result_decl.
Always emit the jump to return_label.
From-SVN: r36770
|
|
* splay-tree.c (splay_tree_predecessor): Fix typo in comment.
Convert the C front-end to use function-at-a-time mode.
* c-common.h: Include splay-tree.h.
(C_DECLARED_LABEL_FLAG): New macro.
(struct language_function): Add x_scope_stmt_stack and
x_function_name_declared_p.
(RECHAIN_STMTS): Move definition.
(lang_statment_code_p): Likewise.
(lang_expand_stmt): Likewise.
(lang_expand_decl_stmt): New variable.
(lang_expand_function_end): Likewise.
(current_scope_stmt_stack): New function.
(add_decl_stmt): Likewise.
(add_scope_stmt): Likewise.
(mark_stmt_tree): Likewise.
(struct c_lang_decl): New structure.
(DECL_SAVED_TREE): Define.
(c_mark_lang_decl): New function.
(c_expand_start_cond): Change prototype.
(c_finish_then): New function.
(c_finish_else): Likewise.
(current_function_name_declared): Remove.
(set_current_function_name_declared): Likewise.
(mark_c_language_function): Declare.
(case_compare): Likewise.
(c_add_case_label): Likewise.
(c_expand_expr): Likewise.
(c_safe_from_p): Likewise.
* c-common.c (lang_expand_function_end): New variable.
(struct if_elt): Add if_stmt.
(c_expand_start_cond): Add the if-statement to the statement-tree,
rather than generating RTL.
(c_finish_then): New function.
(c_expand_start_else): Don't generate RTL.
(c_finish_else): New function.
(c_expand_expr_stmt): Don't generate RTL.
(statement_code_p): Add SCOPE_STMT.
(case_compare): New function.
(c_add_case_label): Likewise.
(mark_stmt_tree): Likewise.
(c_mark_lang_decl): Likewise.
(mark_c_language_function): Likewise.
(c_expand_expr): Likewise.
(c_safe_from_p): Likewise.
* c-decl.c (c_stmt_tree): New variable
(c_scope_stmt_stack): Likewise.
(c_function_name_declared_p): Likewise.
(lang_expand_expr_stmt): Remove.
(poplevel): Don't call output_inline_function for nested
functions.
(pushdecl): Don't set DECL_CONTEXT for a local declaration of an
`extern' function.
(redeclaration_error_message): Change means of computing whether
or not a function is nested.
(lookup_label): Don't call label_rtx.
(init_decl_processing): Add more GC roots.
(start_decl): Add DECL_STMTs to the statement-tree, rather than
calling rest_of_decl_compilation.
(finish_decl): Don't call expand_decl.
(store_parm_decls): Begin the statement-tree, but don't generate
RTL.
(finish_function): Tie off the statement-tree. Call c_expand_body
if appropriate.
(c_expand_body): New function.
(push_c_function_context): Save more information.
(pop_c_function_contxt): Likewise.
(copy_lang_decl): Now that we use DECL_LANG_SPECIFIC, copy it.
(lang_mark_tree): Mark it.
(current_stmt_tree): Adjust.
(current_scope_stmt_stack): New function.
(do_case): Remove.
(set_current_name_declared): Likewise.
(c_begin_compound_stmt): Define.
(c_expand_decl_stmt): Likewise.
* c-lang.c: Include rtl.h and expr.h.
(lang_init): Set more language-specific hooks.
* c-lex.c: Include expr.h.
* c-parse.in: Changes throughout to add statements to the
statement-tree, rather than generating RTL after every statement.
* c-semantics.c (lang_expand_decl_stmt): Define.
(add_decl_stmt): New function.
(add_scope_stmt): Likewise.
(finish_stmt_tree): Tweak.
(genrtl_expr_stmt): Likewise.
(genrtl_decl_stmt): Handle local labels, and call
lang_expand_decl_stmt if required.
(genrtl_for_stmt): Fix line-number handling.
(genrtl_case_label): Handle cleanups.
(genrtl_asm_stmt): Don't call combine_strings.
(genrtl_compound_stmt): Simplify.
(expand_stmt): Handle SCOPE_STMTs.
* c-tree.h (struct lang_decl): New structure.
(C_DECLARED_LABEL_FLAG): Remove.
(c_begin_compound_stmt): Declare.
(c_expand_decl_stmt): Likewise.
(c_expand_start_case): Rename to c_start_case.
(c_finish_case): New function.
* c-typeck.c (start_init): Tweak setting of
constructor_incremental.
(c_expand_asm_operands): Tweak error-handling. Add to the
statement-tree.
(c_expand_return): Add to the statement-tree.
(c_expand_start_case): Rename to ...
(c_start_case): ... this.
(struct c_switch): New type.
(switch_stack): New variable.
(do_case): Simplify.
(c_finish_case): New function.
* dependence.c: Include expr.h.
(enum dependence_type): Change spelling of enumerals.
(check_node_dependence): Adjust.
* expr.h (lang_safe_from_p): Declare.
(safe_from_p): Likewise.
* expr.c (lang_safe_from_p): New variable.
(safe_from_p): Give it external linkage. Use lang_safe_from_p.
* stmt.c (expand_expr_stmt): Avoid clobberring of last_expr_type.
* toplev.c (rest_of_decl_compilation): Robustify.
* tree.c (contains_placeholder_p): Likewise.
* Makefile.in: Update dependencies.
* objc/objc-act.h: Adjust calculation of value for dummy_tree_code.
* objc/objc-act.c: Include rtl.h, expr.h, and c-common.h.
(objc_expand_function_end): New function.
(finish_method_def): Use it.
(init_objc): Initialize more language-specific hooks.
* objc/Make-lang.in: Update dependencies.
* cp-tree.h (struct cp_language_function): Remove
x_scope_stmt_stack and name_declared.
(current_scope_stmt_stack): Remove.
(function_name_declared_p): New macro.
(struct lang_decl_flags): Use c_lang_decl as a base class.
(context): Remove.
(struct lang_decl): Replace saved_tree with context.
(DECL_FRIEND_CONTEXT): Adjust accordingly.
(SET_DECL_FRIEND_CONTEXT): Likewise.
(DECL_VIRTUAL_CONTEXT): Likewise.
(DECL_SAVED_TREE): Remove.
(C_DECLARED_LABEL_FLAG): Likewise.
(cplus_expand_expr_stmt): Don't declare.
(add_decl_stmt): Likewise.
(add_scope_stmt): Likewise.
* decl.c (mark_stmt_tree): Remove.
(case_compare): Likewise.
(finish_case_label): Use c_add_case_label.
(init_decl_processing): Set more language-specific hooks.
(build_enumerator): Fix typo in comment.
(cplus_expand_expr_stmt): Remove.
(mark_lang_function): Use mark_c_language_function.
(lang_mark_tree): Use c_mark_lang_decl.
* decl2.c: Change order of inclusion.
* except.c: Likewise.
* expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
back on c_expand_expr.
* friend.c: Include expr.h.
* init.c: Change order of inclusion.
* Makefile.in: Update dependencies.
* lex.h (free_lang_decl_chain): Remove.
* optimize.c (maybe_clone_body): Use function_name_declared_p.
* pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
it doesn't exist.
(instantiate_decl): Use function_name_declared_p.
* semantics.c (lang_expand_expr_stmt): Remove.
(set_current_function_name_declared): Likewise.
(current_function_name_declared): Likewise.
(begin_compound_stmt): Use function_name_declared_p.
(add_decl_stmt): Remove.
(setup_vtbl_ptr): Use function_name_declared_p.
(add_scope_stmt): Remove.
(current_scope_stmt_stack): New function.
(cp_expand_stmt): Don't handle SCOPE_STMTs.
(expand_body): Use function_name_declared_p.
* tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
* typeck.c: Change order of includes.
(convert_sequence): Remove.
From-SVN: r36464
|
|
* c-common.h (add_stmt): Change prototype.
(RECHAIN_STMTS): New macro.
(CASE_LABEL_DECL): Likewise.
(genrtl_case_label): Change prototype.
(c_expand_start_case): Remove prototype.
(build_case_label): Change prototype.
(decl_constant_value): Declare.
* c-common.c (check_case_value): Handle C++'s extensions to C
semantics.
* c-commnon.def (CASE_LABEL): Add room for the CASE_LABEL_DECL
field.
* c-parse.in (stmt): Adjust handling of return statements and case
laels.
* c-semantics.c (add_stmt): Return the new statement.
(genrtl_return_stmt): Take the RETURN_STMT as input, not the
returned expression. Directly generate RTL, rather than calling
c_expand_return.
(genrtl_switch_stmt): Don't call c_expand_start_case.
(build_case_label): Take the LABEL_DECL as input, too.
(genrtl_case_label): Just call add_case_node.
(expand_stmt): Adjust calls to genrtl_return_stmt and
genrtl_case_label.
* c-tree.h (c_expand_start_case): Declare.
* c-typeck.c (decl_constant_value): Give it external linkage.
(c_expand_return): Don't call expand_return or expand_null_return;
use genrtl_return_stmt instead.
* stmt.c (struct nesting): Remove num_ranges field.
(add_case_node): Give it external linkage.
(expand_start_case): Don't set num_ranges.
(expand_start_case_dummy): Don't clear it.
(pushcase): Rely on add_case_node to handle `default' labels.
(add_case_node): Handle `default' labels.
* tree.c (tree_int_cst_compare): New function.
* tree.h (tree_int_cst_compare): Declare.
(add_case_node): Likewise.
* cp-tree.h (push_switch): Change prototype.
(check_cp_case_value): Remove declaration.
(decl_constant_value): Likewise.
* decl.c (struct cp_switch): Add switch_stmt and cases.
(case_compare): New function.
(push_switch): Set switch_stmt. Initialize cases.
(pop_switch): Clean up cases.
(define_case_label): Rename to ...
(finish_case_label): ... this. Do semantic analysis for case
labels here.
(start_function): Correct comment.
* decl2.c (check_cp_case_value): Remove.
* expr.c (do_case): Remove.
* pt.c (tsubst_expr): Adjust call to finish_case_label.
* semantics.c (genrtl_do_poplevel): Remove declaration.
(RECHAIN_STMTS): Remove.
(finish_break_stmt): Use build_break_stmt.
(finish_continue_stmt): Use build_continue_stmt.
(finish_switch_cond): Adjust condition here, rater than in
c_expand_start_case.
(finish_case_label): Remove.
* typeck.c (c_expand_return): Remove.
(c_expand_start_case): Likewise.
From-SVN: r36305
|
|
* Make-lang.in (CXX_SRCS): Add mangle.c.
* Makefile.in (CXX_OBJS): Add mangle.o.
(mangle.o): New rule.
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r34394
|
|
* cp-tree.def (THUNK_DECL): Remove.
* cp-tree.h (DECL_THUNK_P): New macro.
(DECL_NON_THUNK_FUNCTION_P): Likewise.
(DECL_EXTERN_C_FUNCTION_P): Likewise.
(SET_DECL_THUNK_P): Likewise.
(DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
(FNADDR_FROM_VTABLE_ENTRY): Likewise.
(DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
* decl.c (decls_match): Use DECL_EXTERN_C_P.
(duplicate_decls): Likewise.
(pushdecl): Likewise. Adjust thunk handling.
(grokfndecl): Use DECL_EXTERN_C_P.
* decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
* dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
* except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
* expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
* method.c (make_thunk): Use SET_DECL_THUNK_P. Set
DECL_NO_STATIC_CHAIN.
(emit_thunk): Don't play games with TREE_CODE on thunks. Don't
set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
* search.c (covariant_return_p): Remove THUNK_DECL handling.
* ir.texi: Update.
From-SVN: r33647
|
|
* expr.c (cplus_expand_expr): Preserve temporaries when expanding
STMT_EXPRs.
* optimize.c (struct inline_data): Add target_exprs field.
(declare_return_variable): When a function returns an aggregate,
use the variable declared in the TARGET_EXPR as the remapped
DECL_RESULT.
(expand_call_inline): Update the pending target_exprs stack.
(optimize_function): Initialize the stack.
From-SVN: r33561
|
|
modify sizes to be unsigned and use HOST_WIDE_INT.
* alias.c (reg_known_value_size): Now unsigned.
* c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position.
(really_start_incremental_init): Use bitsize_zero_node.
(push_init_level, pop_init_level, output_init_element): Likewise.
Use bitsize_unit_node and bitsize_one_node.
(output_pending_init_elements, process_init_element): Likewise.
* combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned.
(make_extraction): Position and length HOST_WIDE_INT and unsigned
HOST_WIDE_INT, respectively.
(get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT.
(num_sign_bit_copies): Returns unsigned.
BITWIDTH now unsigned; rework arithmetic.
Remove recursive call from arg to MAX.
(combine_instructions, init_reg_last_arrays): NREGS now unsigned.
(setup_incoming_promotions, can_combine_p, try_combine, simplify_set):
REGNO now unsigned.
(set_nonzero_bit_and_sign_copies): NUM now unsigned.
(find_split_point, expand_compound_operation, make_extraction): LEN
now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT.
(make_field_assignment): Likewise.
(combine_simplify_rtx): Add cast.
(expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic.
(force_to_mode): WIDTH now unsigned; add cast.
(if_then_else_cond): SIZE now unsigned.
(nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned.
(extended_count): Now returns unsigned.
(simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT.
Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned.
(simplify_comparison): MODE_WIDTH now unsigned.
(update_table_tick): REGNO and ENDREGNO now unsigned; new var R.
(mark_used_regs_combine): Likewise; rework arithmetic.
(record_value_for_reg): REGNO, ENDREGNO, and I now unsigned.
(record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise.
(record_promoted_value): REGNO now unsigned.
(get_last_value_validate): REGNO, ENDREGNO, and J now unsigned.
(get_last_value): REGNO now unsigned.
(use_crosses_set_p): REGNO and ENDREGNO now unsigned.
(reg_dead_regno, reg_dead_endregno): Now unsigned.
(remove_death): Arg REGNO now unsigned.
(move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned.
(reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO
now unsigned.
* convert.c (convert_to_integer): INPREC and OUTPREC now unsigned.
* cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned.
(struct cse_reg_info): REGNO now unsigned.
(cached_regno): Now unsigned.
(REGNO_QTY_VALID_P): Add cast.
(make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned.
(remove_invalid_regs): Likewise.
(remove_invalid_subreg_refs): Likewise; arg WORD also unsigned
as are variables END and I.
(get_cse_reg_info, insert): Likewise.
(mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned.
(canon_hash): Likewise.
(insert_regs, lookup_for_remove): REGNO now unsigned.
(invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned.
New variable RN.
* dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0.
* dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast.
* emit-rtl.c (subreg_realpart_p): Add cast.
(operand_subword): Arg I is now unsigned as is var PARTWORDS.
(operand_subword_force): Arg I is now unsigned.
* except.c (eh_regs): Variable I is now unsigned.
* explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT.
* expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT;
length is unsigned HOST_WIDE_INT; likewise for internal variables.
(store_split_bit_field, extract_fixed_bit_field): Likewise.
(extract_split_bit_field, store_bit_field, extract_bit_field):
Likewise.
* expr.c (store_constructor_fields, store_constructor, store_field):
Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT.
(expand_assignment, expand_expr, expand_expr_unaligned): Likewise.
(do_jump): Likewise.
(move_by_pieces, move_by_pieces_ninsns, clear_by_pieces):
MAX_SIZE is now unsigned.
(emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned.
(emit_group_store): Likewise.
(emit_move_insn): I now unsigned.
(store_constructor): Use host_integerp, tree_low_cst, and
bitsize_unit_node.
(get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT.
Rework all calculations to use trees and new fields.
* expr.h (promoted_input_arg): Regno now unsigned.
(store_bit_field, extract_bit_field): Adjust types of pos and size.
(mark_seen_cases): Arg is HOST_WIDE_INT.
* flow.c (verify_wide_reg_1): REGNO now unsigned.
* fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT;
precisions and alignments are unsigned.
(optimize_bit_field_compare, fold_truthop): Likewise.
(int_const_binop): Adjust threshold for size_int_type_wide call.
(fold_convert): Likewise.
(size_int_type_wide): Make table larger and fix thinko that only
had half of table used.
(all_ones_mask_p, fold): Precisions are unsigned.
* function.c (put_reg_info_stack): REGNO is unsigned.
(instantiate_decl): Size is HOST_WIDE_INT.
(instantiate_virtual_regs): I is unsigned.
(assign_parms): REGNO, REGNOI, and REGNOR are unsigned.
(promoted_input_arg): REGNO is unsigned.
* function.h (struct function): x_max_parm_reg is now unsigned.
* gcse.c (max_gcse_regno): Now unsigned.
(struct null_pointer_info): min_reg and max_reg now unsigned.
(lookup_set, next_set): REGNO arg now unsigned.
(compute_hash_table): REGNO and I now unsigned.
(handle_avail_expr): regnum_for_replacing now unsigned.
(cprop_insn): REGNO now unsigned.
(delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned.
* ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case.
* global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned.
* hard-reg-set.h (reg_class_size): Now unsigned.
* integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO.
* jump.c (mark_modified_reg): I now unsigned; add cast.
(rtx_equal_for_thread_p): Add cast.
* loop.c (max_reg_before_loop): Now unsigned.
(struct_movable): REGNO now unsigned.
(try_copy_prop): REGNO arg unsigned.
(regs_match_p): XN and YN now unsigned.
(consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned.
(strength_reduce): Likewise; NREGS also unsigned.
(first_increment_giv, last_increment_giv unsigned): Now unsigned.
* loop.h (struct iv_class): REGNO now unsigned.
(max_reg_before_loop, first_increment_giv, last_increment_giv):
Now unsigned.
* machmode.h (mode_size, mode_unit_size): Now unsigned.
(mode_for_size, smallest_mode_for_size): Pass size as unsigned.
* optabs.c (expand_binop): I and NWORDS now unsigned.
(expand_unop): I now unsigned.
* print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do
print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET.
* real.c (significand_size): Now returns unsigned.
* real.h (significand_size): Likewise.
* regclass.c (reg_class_size): Now unsigned.
(choose_hard_reg_mode): Both operands now unsigned.
(record_reg_classes): REGNO and NR now unsigned.
(reg_scan): NREGS now unsigned.
(reg_scan_update): old_max_regno now unsigned.
(reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned.
* reload.c (find_valid_class): BEST_SIZE now unsigned.
(find_dummy_reload): REGNO, NWORDS, and I now unsigned.
(hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned.
Likewise for variable R.
(refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned,
as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R.
(find_equiv_reg): Add casts.
(regno_clobbered_p): Arg REGNO now unsigned.
* reload.h (struct reload): NREGS now unsigned.
(refers_to_regno_for_reload_p): Regno args are unsigned.
(regno_clobbered_p): Likewise.
* reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned.
(compute_use_by_pseudos): REGNO now unsigned.
(find_reg): I and J now unsigned, new variable K, and change loop
variables accordingly; THIS_NREGS now unsigned.
(alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned.
(spill_hard_reg): REGNO arg now unsigned; add casts.
(forget_old_reloads_1): REGNO, NR, and I now unsigned.
(mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned.
(clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO,
END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned.
(reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned.
(choose_reload_regs): MAX_GROUP_SIZE now unsigned.
(emit_reload_insns): REGNO now unsigned.
(reload_cse_move2add): Add cast.
(move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO
and rework loop.
* resource.c (mark_referenced_resources, mark_set_resources): New
variable R; REGNO and LAST_REGNO now unsigned.
(mark_target_live_regs): J and REGNO now unsigned.
* rtl.c (mode_size, mode_unit_size): Now unsigned.
* rtl.h (union rtunion_def): New field rtuint.
(XCUINT): New macro.
(ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT.
(operand_subword, operand_subword_force): Word number is unsigned.
(choose_hard_reg_mode): Operands are unsigned.
(refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned.
(find_regno_note, find_regno_fusage, replace_regs): Likewise.
(regno_use_in, combine_instructions, remove_death): Likewise.
(reg_scan, reg_scan_update): Likewise.
(extended_count): Return is unsigned.
* rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I,
INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO.
(reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned.
(reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned.
(reg_reg_last_1): FIRS and LAST now unsigned.
(dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned.
(dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO
now unsigned.
(find_regno_note, regno_use_in): Arg REGNO now unsigned.
(find_regno_fusage): Likewise; also var REGNOTE now unsigned.
(find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned.
(replace_regs): Arg NREGS now unsigned.
* sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0.
* simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned.
(simplify_binary_operation): Likewise.
(cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and
THIS_LAST now unsigned.
(cselib_record_set): Add cast.
* ssa.c (ssa_max_reg_num): Now unsigned.
(rename_block): REGNO now unsigned.
* stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT;
sizes now unsigned.
(all_cases_count): Just return -1 not -2.
COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT.
Rework tests to use trees whenever possible.
Use host_integerp and tree_low_cst.
(mark_seen_cases): COUNT arg now HOST_WIDE_INT;
Likewise variable NEXT_NODE_OFFSET; XLO now unsigned.
(check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT.
* stor-layout.c (mode_for_size): SIZE arg now unsigned.
(smallest_mode_for_size): Likewise.
(layout_decl): Simplify handing of a specified DECL_SIZE_UNIT.
KNOWN_ALIGN is now an alignment, so simplify code.
Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type.
(start_record_layout): Renamed from new_record_layout_info.
Update to new fields.
(debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far):
New functions.
(place_union_field): Renamed from layout_union_field.
Update to use new fields in rli.
(place_field): Renamed from layout_field.
Major rewrite to use new fields in rli; pass alignment to layout_decl.
(finalize_record_size): Rework to use new fields in rli and handle
union.
(compute_record_mode): Rework to simplify and to use new DECL fields.
(finalize_type_size): Make rounding more consistent.
(finish_union_layout): Deleted.
(layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either.
(layout_type, case RECORD_TYPE): Call new function names.
(initialize_sizetypes): Set TYPE_IS_SIZETYPE.
(set_sizetype): Set TYPE_IS_SIZETYPE earlier.
(get_best_mode): UNIT is now unsigned; remove casts.
* tree.c (bit_position): Compute from new fields.
(byte_position, int_byte_position): New functions.
(print_type_hash_statistics): Cast to remove warning.
(build_range_type): Use host_integerp and tree_low_cst to try to hash.
(build_index_type): Likewise; make subtype of sizetype.
(build_index_2_type): Pass sizetype to build_range_type.
(build_common_tree_nodes): Use size_int and bitsize_int to
initialize nodes; add bitsize_{zero,one,unit}_node.
* tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK.
(DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise.
(DECL_PACKED, DECL_BIT_FIELD): Likewise.
(DECL_FIELD_BITPOS): Deleted.
(DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields.
(DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK.
(DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise.
(DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise.
(DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise.
(DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise.
(DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise.
(DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK.
(DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK.
(DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise.
(DECL_ALIGN): Adjust to new field in union.
(DECL_OFFSET_ALIGN): New field.
(DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK.
(DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK.
(union tree_decl): Add struct for both aligns.
(enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}.
(bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added.
(struct record_layout_info): Rework fields to have offset
alignment and byte and bit position.
(start_record_layout, place_field): Renamed from old names.
(rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls.
(byte_position, int_byte_position): Likewise.
(get_inner_reference): Change types of position and length.
* unroll.c (unroll_loop): New variable R; use for some loops.
MAX_LOCAL_REGNUM and MAXREGNUM now unsigned.
(calculate_giv_inc): Arg REGNO now unsigned.
(copy_loop_body): REGNO and SRC_REGNO now unsigned.
* varasm.c (assemble_variable): Clean up handling of size using
host_integerp and tree_low_cst.
(decode_addr_const): Use byte, not bit, position.
(output_constructor): bitpos and offsets are HOST_WIDE_INT;
use tree_low_cst and int_bit_position.
* objc/objc-act.c (build_ivar_list_initializer): Use byte_position.
* ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT.
* ch/typeck.c (expand_constant_to_buffer): Use int_byte_position.
(extract_constant_from_buffer): Likewise.
* cp/class.c (build_vbase_pointer_fields): layout_field now
place_field.
(get_vfield_offset): Use byte_position.
(set_rtti_entry): Set OFFSET to ssizetype zero.
(get_binfo_offset_as_int): Deleted.
(dfs_record_base_offsets): Use tree_low_cst.
(dfs_search_base_offsets): Likewise.
(layout_nonempty_base_or_field): Reflect changes in RLI format
and call byte_position.
(layout_empty_base): Convert offset to ssizetype.
(build_base_field): use rli_size_unit_so_far.
(dfs_propagate_binfo_offsets): Do computation in proper type.
(layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
(layout_class_type): Reflect changes in RLI names and fields.
(finish_struct_1): Set DECL_FIELD_OFFSET.
* cp/dump.c (dequeue_and_dump): Call bit_position.
* cp/expr.c (cplus_expand_constant): Use byte_position.
* cp/rtti.c (expand_class_desc): Use bitsize_one_node.
* cp/typeck.c (build_component_addr): Use byte_position and don't
special case for zero offset.
* f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node.
(ffecom_tree_canonize_ref_): Likewise.
* java/class.c (make_field_value): Use byte_position.
* java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
(java_array_data_offset): Likewise.
* java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
bzero call.
From-SVN: r32742
|
|
* cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
* class.c (check_bitfield_decl): Turn illegal bitfields into
non-bitfields.
(dfs_propagate_binfo_offsets): Adjust for new size_binop
semantics.
(dfs_offset_for_unshared_vbases): Likewise.
* cvt.c (cp_convert_to_pointer): Convert NULL to a
pointer-to-member correctly under the new ABI.
* expr.c (cplus_expand_constant): Don't use cp_convert when
turning an offset into a pointer-to-member.
* init.c (resolve_offset_ref): Don't adjust pointers-to-members
when dereferencing them under the new ABI.
* typeck.c (get_member_function_from_ptrfunc): Tweak calculation
of pointers-to-members under the new ABI.
From-SVN: r32631
|
|
* c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst.
* c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c:
Regenerated.
* c-tree.h (min_precision): Move declaration to here.
* c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst.
(build_unary_op, add_pending_init): Use bit_position.
(pending_init_member, process_init_element): Likewise.
(really_start_incremental_init, push_init_level, pop_init_level):
Don't make copies of nodes or modify them in place, use consistent
types when tracking positions, and use tree routines computations.
(set_init_index, output_init_element): Likewise.
(output_pending_init_elements, process_init_element): Likewise.
* dbxout.c (dbxout_type_fields): Use bit_position, host_integerp,
tree_low_cst and int_bit_position; also minor cleanup.
(dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise.
(print_cst_octal): Precision is unsigned.
(dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst.
* dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT.
(simple_type_align_in_bits): Result is unsigned int.
Use tree_int_low_cst and host_integerp.
(simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT.
(field_byte_offset): Result is HOST_WIDE_INT.
Change types of internal variables so alignments are unsigned int,
offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT.
Use host_integerp, tree_low_cst, and int_bit_position.
(add_bit_offset_attribute): Likewise.
(add_data_member_location_attribute): Use tree_cst_low.
(add_bound_info): Use host_integerp, integer_zerop, and integer_onep.
(add_bit_size_attribute): Use tree_low_cst.
(add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise.
* dwarfout.c: Similar changes to dwarf2out.c.
* expr.c (expand_expr, case ARRAY_REF): Remove redundant code.
* genoutput.c (n_occurences): Return -1 for null string.
(strip_whitespace): Accept null string and make into function.
(scan_operands): Reflect above changes.
* sdbout.c (plain_type_1): Use host_integerp and tree_low_cst.
(sdbout_field_types, sdbout_one_type): Likewise; also use bit_position.
* ssa.c (rename_registers): Add missing cast of arg to bzero.
* tree.c (int_size_in_bytes): Check for too big to represent.
(bit_position, int_bit_position, host_integerp, tree_low_cst): New fns.
* tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position):
New declarations.
(min_precision): Delete from here.
* varasm.c (decode_addr_const): Use host_integerp, bit_position,
and int_bit_position.
* objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT.
(encode_method_def): Likewise.
(build_ivar_list_initializer): Use int_bit_position.
(generate_shared_structures): Convert size.
(encode_type, encode_complete_bitfield): Use integer_zerop.
(encode_bitfield): Use tree_low_cst and int_bit_position.
* ch/typeck.c (min_precision): New function.
(build_chill_slice): Use host_integerp and tree_low_cst.
(expand_constant_to_buffer): Likewise and also int_bit_position.
LO is unsigned HOST_WIDE_INT
(build_chill_array_ref_1): Make `i' be HOST_WIDE_INT; use tree_low_cst.
(extract_constant_from_buffer): Sizes are now HOST_WIDE_INT.
Use host_integerp and tree_low_cst.
(build_chill_bin_type): Use host_integerp and tree_low_cst.
(layout_chill_range_type): Use tree_int_cst_sgn, compare_tree_int,
tree_low_cst, and min_precision.
(apply_chill_array_layout): Cleanups for types of variables
and use tree_int_cst_sgn, compare_tree_int, and tree_low_cst.
(apply_chill_field_layout): Likewise.
* cp/class.c (build_vbase_path): Use integer_zerop.
(build_vtable_entry): Use tree_low_cst.
(get_vfield_offset): Use bit_position.
(dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
Use tree_low_cst.
(check_bitfield_decl): Set DECL_SIZE using convert.
(build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
(layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
Use tree_low_cst.
(finish_struct_1): Use bit_position.
(dump_class_hierarchy): Use tree_low_cst.
* cp/cp-tree.h (min_precision): Add declaration.
* cp/decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
* cp/error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
(dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
* cp/expr.c (cplus_expand_constant): Use bit_position.
* cp/init.c (build_vec_init): Use host_integerp and tree_low_cst.
* cp/rtti.c (get_base_offset): Use bit_position.
* cp/typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
host_integerp, and tree_low_cst.
(pointer_int_sum): Use integer_zerop.
(build_component_addr): Use bit_position.
* java/class.c (make_field_value): Properly handle sizes.
(get_dispatch_vector): Use tree_low_cst and host_integerp.
(layout_class_method): Count using trees.
* java/decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with
copy_node.
* java/expr.c (java_array_data_offset): Use int_bit_position.
(build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
(build_invokevirtual): Use tree_low_cst and do computations with trees.
From-SVN: r32607
|
|
into a higher level.
* function.c (free_temps_for_rtl_expr): Don't free slots
that have been pushed into a higher level.
* expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
RTL_EXPR_HAS_NO_SCOPE after all.
From-SVN: r32355
|
|
expand_end_stmt_expr directly.
* expr.c (cplus_expand_expr, case STMT_EXPR): Use
expand_start_stmt_expr and expand_end_stmt_expr directly. Set
RTL_EXPR_HAS_NO_SCOPE.
* pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
later.
* dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
From-SVN: r32345
|
|
* builtins.c (c_strlen): Use size_diffop and return ssizetype value.
(expand_builtin_strcpy): Pass correct type to size_binop.
(expand_builtin_strcmp): Likewise.
Clean up conditional structure.
* c-decl.c (init_decl_processing): Don't call set_sizetype twice.
(complete_array_type): Don't use size_binop for MAXINDEX.
* c-typeck.c (c_sizeof): Use size_one_node and TYPE_SIZE_UNIT.
(c_sizeof_nowarn, c_size_in_bytes): Likewise.
(c_alignof): Use size_one_node.
(build_unary_op): Pass arg of proper type to size_binop.
(really_start_incremental_init, push_init_level): Use sizetype for
constructor{,_bit,_unfilled}_index.
(pop_init_label, output_init_element): Likewise.
(output_pending_init_elements, process_init_element): Likewise.
* calls.c (compute_argument_block_size): Field VAR is ssizetype.
* expr.c (store_expr): Use size_int.
(store_constructor): Use proper types for size_binop args.
(get_inner_reference, expand_expr, case ARRAY_REF): Likewise.
(expand_expr_unaligned): Likewise.
(string_contant): Return object of sizetype.
* expr.h (SUB_PARM_SIZE): Call size_diffop and pass proper types.
(ARGS_SIZE_RTX): Call ARGS_SIZE_TREE.
(ARGS_SIZE_TREE): Pass proper types to size_binop.
* fold-const.c (int_const_binop): Refine when size_int is called.
(fold_convert): Likewise.
(size_int_wide): Rework to take KIND as arg, only take low order
bits, handle new sizetype_tab datatype, and chain entries in
size_table.
(size_int_type_wide): New function.
(size_binop): Validate types of arguments.
(ssize_binop): Deleted.
(size_diffop): New function.
(extract_muldiv): Only fold division into multiplication for sizetypes.
* function.c (assign_parms): Use size_diffop and make sure
VAR field is of ssizetype; also pass proper type to size_binop.
(locate_and_pad_parm, pad_to_arg_alignment): Likewise.
(round_down): Deleted from here.
* store-layout.c (sizetype_tab): Now an array.
(sizetype_set, early_root_list): New variables.
(variable_size): Use size_one_node.
(round_up): Pass proper type to size_binop.
(round_down): Moved to here and corrected as above.
(layout_record): Pass proper arg types to size_binop.
(layout_type): Likewise.
If sizetype_set is zero, record the type just laid out.
(make_unsigned_type): Don't call set_sizetype;
(make_signed_type): Likewise; also, call fixup_signed_type.
(initialize_sizetypes): New function.
(set_sizetype): Make copy of types, set TYPE_IS_SIZETYPE, and
set name of bitsizetype to "bit_size_type".
Fix up type of sizes of all types made before call.
* tm.texi (ROUND_TYPE_SIZE_UNIT): New macro.
* tree.c (fix_sizetype): Deleted.
(build_common_tree_nodes): Call initialize_sizetypes.
(build_common_tree_nodes_2): Don't call fix_sizetype.
* tree.h (TYPE_IS_SIZETYPE): New macro.
(initialize_sizetype): New declaration.
(enum size_type_kind): New type.
(struct sizetype_tab): Deleted.
(sizetype_tab): Now array; adjust sizetype macros.
(size_diffop, size_int_type_wide): New functions.
(size_int_wide): Change number of args and type; access macros changed.
(ssize_int, sbitsize_int): New macros.
* config/i960/i960.h (ROUND_TYPE_SIZE): Use size_int.
(ROUND_TYPE_SIZE_UNIT): New macro.
* ch/actions.c (chill_convert_for_assignment): Don't use size_binop
for things that aren't sizes.
(expand_varying_length_assignment): Likewise.
* ch/convert.c (digest_array_tuple, convert): Likewise.
* ch/typeck.c (build_chill_slice, smash_dummy_type): Likewise.
(build_chill_slice_with_range): Likewise.
(build_chill_slice_with_length): Likewise.
(build_array_from_set): Adjust types for size_binop.
* ch/expr.c (build_concat_expr, build_chill_repetition_op): Likewise.
(build_chill_sizeof): Use TYPE_SIZE_UNIT.
* ch/tree.c (build_string_type): Pass proper type to size_binop.
* cp/class.c (dfs_build_vtable_offset_vtbl_entries): Don't use
size_binop on things that are not sizes; ssize_binop deleted.
Call size_diffop when appropriate.
(dfs_build_vcall_offset_vtbl_entries): Likewise.
(build_primary_vtable, build_secondary_vtable): Likewise.
(dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
Variable I is HOST_WIDE_INT.
(get_vfield_offset): Pass proper types to size_binop.
(size_extra_vtbl_entries, layout_virtual_bases): Likewise.
(finish_struct_1): Likewise.
(skip_rtti_stuff): Arg N is now pointer to signed.
(layout_class_type): Use size_zero_node.
* cp/cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
* cp/cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
* cp/decl.c (complete_arry_type): Pass proper types to size_binop.
(xref_basetypes): BINFO_OFFSET is sizetype.
* cp/error.c (dump_expr): Don't use size_binop non-sizes.
* cp/expr.c (cplus_expand_constant): Pass proper types to size_binop.
* cp/init.c (construct_virtual_bases): Fix type error.
(build_vec_delete_1): Pass proper type to size_binop and don't
fold result.
* cp/lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
* cp/rtti.c (get_base_offset): Pass proper type to size_binop.
* cp/search.c (dfs_find_vbases): Fix type error.
(expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
(dfs_get_vbase_types): BINFO_OFFSET is sizetype.
* cp/tree.c (debug_binfo): Variable N is signed.
Use HOST_WIDE_INT_PRINT_DEC.
* cp/typeck.c (comptypes): sizetype is same as equivalent integer type.
(c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
size_one_node and size_zero_node.
(c_alignof): Use size_one_node.
(build_component_addr): Pass proper types to size_binop.
(expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
* f/com.c (ffecom_arrayref_): Convert args to size_binop to proper
type.
(ffecom_tree_canonize_ptr_): Don't use size_binop for non-sizes.
(ffecom_tree_canonize_ref_): Likewise.
(type_for_mode): Handle TImode.
* f/ste.c (ffeste_io_dofio_, ffeste_io_douio_): Use TYPE_SIZE_UNIT.
(ffeste_io_ciclist_): Likewise.
* java/expr.c (build_java_ret): Pass proper type to size_binop.
From-SVN: r32225
|
|
From-SVN: r32185
|