* testsuite/Makefile.am (INCLUDES): Add LIBSUPCXX_INCLUDES.
* testsuite/Makefile.in: Regenerate.
* testsuite/testsuite_hooks.h: Use __throw_exception_again,
include functexcept.h so that -fno-exceptions will build.
Jason Merrill [Fri, 2 Aug 2002 11:57:22 +0000 (07:57 -0400)]
langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro.
* langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro.
* langhooks.c (lhd_expr_size): Define default.
* langhooks.h (struct lang_hooks): Add expr_size.
* explow.c (expr_size): Call it.
* expr.c (store_expr): Don't copy an expression of size zero.
(expand_expr) [CONSTRUCTOR]: Use expr_size to calculate how much
to store.
* Makefile.in (builtins.o): Depend on langhooks.h.
* cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
(cp_expr_size): New fn.
* call.c (build_over_call): Lose empty class hackery.
(convert_arg_to_ellipsis): Promote non-POD warning to error.
* typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
Toon Moene [Fri, 2 Aug 2002 11:01:31 +0000 (13:01 +0200)]
simplify-rtx.c (simplify_binary_operation): x * 1 is allowed when not honoring signalling NaNs.
2002-08-02 Toon Moene <toon@moene.indiv.nluug.nl>
* simplify-rtx.c (simplify_binary_operation): x * 1 is allowed
when not honoring signalling NaNs.
(simplify_ternary_operation): a == b has a definite value
when not honoring NaNs.
* cppexp.c (cpp_classify_number): Suppress -Wtraditional
warning about 'LL' suffix (but not 'ULL' etc) when
-Wno-long-long is in effect.
* cppmacro.c (_cpp_builtin_macro_text) [BT_TIME, BT_DATE]:
Check for failing time()/localtime(), issue a warning, and
make __TIME__ and __DATE__ expand to fallback strings.
* doc/cpp.texi, doc/extend.texi: Document behavior of __DATE__
and __TIME__ when the date and time cannot be determined.
David Edelsohn [Fri, 2 Aug 2002 01:12:09 +0000 (01:12 +0000)]
varasm.c (asm_emit_uninitialized): Return false if global BSS and ASM_EMIT_BSS not supported by target.
* varasm.c (asm_emit_uninitialized): Return false if global BSS
and ASM_EMIT_BSS not supported by target.
(assemble_variable): Do not duplicate uninitialized logic.
Fall through if asm_emit_uninitialized failed.
* config/ns32k/ns32k.h (TARGET_IEEE_COMPARE): Correct earlier patch.
(RETURN_ADDR_RTX): Cannot determine return address for FRAME > 0
when there is no frame pointer.
(INITIAL_FRAME_POINTER_OFFSET): Count stack space for saved fp
registers properly.
* config/ns32k/__unorddf2.c: New file.
* config/ns32k/__unordsf2.c: New file.
* config/ns32k/t-ns32k: New file.
* config.gcc (ns32k-*-netbsd*): Use it.
Toon Moene [Thu, 1 Aug 2002 09:08:38 +0000 (11:08 +0200)]
c-common.c (cb_register_builtins): Set __FINITE_MATH_ONLY__ to 1 if -ffinite-math-only is given, and to 0 otherwise.
2002-08-01 Toon Moene <toon@moene.indiv.nluug.nl>
* c-common.c (cb_register_builtins): Set
__FINITE_MATH_ONLY__ to 1 if -ffinite-math-only
is given, and to 0 otherwise.
* combine.c (simplify_if_then_else): HONOR_NANS
implies FLOAT_MODE_P.
Neil Booth [Thu, 1 Aug 2002 06:25:06 +0000 (06:25 +0000)]
c-common.c (cb_register_builtins): If C++, define __EXCEPTIONS, __DEPRECATED and __GXX_ABI_VERSION as appropriate.
* c-common.c (cb_register_builtins): If C++, define
__EXCEPTIONS, __DEPRECATED and __GXX_ABI_VERSION as appropriate.
* gcc.c (cpp_unique_options): Remove __GXX_ABI_VERSION.
cp:
* lang-specs.h: Simplify in accordance with new code in
c-common.c.
Neil Booth [Thu, 1 Aug 2002 06:20:46 +0000 (06:20 +0000)]
c-common.c: Define all C/ObjC/C++ warning and flag variables.
* c-common.c: Define all C/ObjC/C++ warning and flag variables.
* c-common.h: Declare all C/ObjC/C++ warning and flag variables.
* c-decl.c: Move all warning and flag variables to c-common.c.
* c-format.c: Move all warning variables to c-common.c.
* c-tree.h: Move all warning and flag declarations to c-common.h.
* objc/objc-act.c: Move all warning variables to c-common.c.
(flag_warn_protocol): Rename warn_protocol.
cp:
* cp-tree.h: Move all warning and flag declarations to c-common.h.
* decl.c: Move all warning and flag variables to c-common.c.
* decl2.c: Move all warning and flag variables to c-common.c.
* lex.c (flag_digraphs): Remove.
(warn_traditional): Now in c-common.c.
Mark Mitchell [Thu, 1 Aug 2002 04:46:23 +0000 (04:46 +0000)]
call.c (build_field_call): Do not look up the field by name.
* call.c (build_field_call): Do not look up the field by name.
(build_method_call): Simplify.
(struct z_candidate): Add access_path and conversion_path. Remove
basetype_path.
(convert_class_to_reference): Adjust use of
add_function_candidate.
(add_candidate): Add conversion_path argument.
(add_function_candidate): Use it.
(add_conv_dndidate): Likewise.
(build_builtin_candidate): Likewise.
(add_template_candidate_real): Add conversion_path argument.
(add_template_conv_candidate): Likewise.
(add_template_candidate): Likewise.
(build_user_type_conversion_1): Use it.
(build_new_function_call): Remove name lookup code. Adjust use of
add_template_candidate and add_function_candidate.
(build_new_op): Likewise.
(convert_like_real): Use build_special_member_call.
(build_over_call): Use cand->conversion_path.
(build_special_member_call): New method.
(build_new_method_call): Remove name lookup code.
* cp-tree.def (OFFSET_REF): Update documentation.
(TEMPLATE_ID_EXPR): Likewise.
* cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
(BASELINK_OPTYPE): Likewise.
(build_new_method_call): Adjust prototype.
(build_special_member_call): New method.
(build_baselink): New method.
(build_offset_ref_call_from_tree): Likewise.
(build_call_from_tree): Likewise.
(finish_qualified_call_expr): Remove.
(finish_call_expr): Adjust prototype.
(build_x_function_call): Remove.
* cvt.c (ocp_convert): Use build_special_member_call.
* decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
(build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
CALL_EXPR.
(build_offset_ref_call_from_tree): New function.
(build_call_from_tree): Likewise.
* init.c (expand_cleanup): Use build_special_member_call.
(expand_default_init): Likewise.
(build_member_call): Use finish_call_expr.
(build_new_1): Use build_special_member_call.
(push_base_cleanups): Likewise.
* method.c (do_build_assign_ref): Likewise.
* parse.y (template_id): Do not pass a COMPONENT_REF to
lookup_template_function.
(primary): Use parse_finish_call_epxr, not finish_call_expr.
(parse_finish_call_expr): New function.
* pt.c (lookup_template_function): Add assertions.
* search.c (lookup_base): Allow T to be a binfo.
(build_baselink): New function.
(lookup_member): Use it.
* semantics.c (finish_call_expr): Do not do name lookup.
(finish_object_call_expr): Remove #if 0'd code.
(finish_qualified_call_expr): Remove.
* typeck.c (build_x_function_call): Remove.
(build_static_case): Use build_special_member_call.
* typeck2.c (build_functional_cast): Likewise.
* g++.dg/inherit/operator1.C: New test.
* g++.dg/lookup/disamb1.C: Fix typo in comment.
* g++.dg/other/error1.C: Change expected error message.
* g++.dg/template/conv4.C: Likewise.
Stan Shebs [Wed, 31 Jul 2002 23:18:44 +0000 (23:18 +0000)]
config.gcc (i[34567]86-*-darwin*): New configuration.
* config.gcc (i[34567]86-*-darwin*): New configuration.
* config/darwin.h (TARGET_ENCODE_SECTION_INFO): Undefine before
defining.
(TARGET_ENCODE_SECTION_INFO): Ditto.
(ASM_PREFERRED_EH_DATA_FORMAT): Ditto.
* config/darwin.c (machopic_indirect_data_reference): Remove
setting of RTX_UNCHANGING_P.
(machopic_legitimize_pic_address): Move RTX_UNCHANGING_P up so as
* config/i386/t-darwin: New file.
* config/i386/darwin.h: New file.
* config/i386/i386.h (TARGET_MACHO): Add default definition.
* config/i386/i386.md (tablejump): Add TARGET_MACHO case.
* config/i386/i386.c (output_set_got): For Mach-O, output Mach-O
label and not the GOT add.
(constant_address_p): For Mach-O, seeing a CONST is enough.
(legitimate_pic_address_disp_p): Add a Mach-O case.
(legitimate_address_p): Also test machopic_operand_p if Mach-O.
(legitimize_pic_address): Use generic Mach-O code to legitimize.
(output_pic_addr_const): Suppress @PLT if Mach-O, and parens
if outputting a difference.
(ix86_output_addr_diff_elt): Add Mach-O case.
(ix86_expand_move): Similarly.
(ix86_expand_call): Similarly.
(current_machopic_label_num): New global.
(machopic_output_stub): New function.
(ix86_value_regno): New function.
(ix86_function_value): Use it instead of VALUE_REGNO.
(ix86_libcall_value): Ditto.
* config/i386/unix.h (VALUE_REGNO): Remove.
Benjamin Kosnik [Wed, 31 Jul 2002 21:24:18 +0000 (21:24 +0000)]
re PR libstdc++/7442 (cxxabi.h does not match the C++ ABI)
2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/7442
* libsupc++/cxxabi.h
(__base_class_info): Change to __base_class_type_info. 2.9.5p6c
(__base_class_info::__base): Change to __base_type. 2.9.5p6c
(__base_class_info::offset_shift): Change to __offset_shift. 2.9.5p6c
(__vmi_class_type_info::__base_info): Don't make const, of type
__base_class_type_info, as per 2.9.5p6c
(__pbase_type_info::__qualifier_flags): Change to __flags, as per
2.9.5p7.
(__pbase_type_info::__qualifier_masks): Change to __masks, as per
2.9.5p7.
(__pointer_to_member_type_info::__context_class): Change member to
__context, as per 2.9.5p9.
* libsupc++/tinfo2.cc (__pointer_catch): Change __context_class to
__context.
* libsupc++/tinfo2.cc (__do_catch): Change __qualifier_flags to
__flags.
* libsupc++/tinfo.cc (__do_find_public_src): Change __base to
__base_type.
* libsupc++/tinfo.cc (__do_dyncast): Same.
* libsupc++/tinfo.cc (__do_upcast): Same.
Chris Demetriou [Wed, 31 Jul 2002 06:00:53 +0000 (06:00 +0000)]
elf.h (STARTFILE_SPEC): Define differently if default ABI is MEABI.
2002-07-30 Chris Demetriou <cgd@broadcom.com>
* config/mips/elf.h (STARTFILE_SPEC): Define differently if
default ABI is MEABI. (Undoes incorrect change in Eric Christopher's
patch on 2002-07-29.)
* config/mips/elf64.h (STARTFILE_SPEC): Likewise.
Alan Modra [Tue, 30 Jul 2002 23:12:35 +0000 (23:12 +0000)]
configure.in: Move generic linux case to end.
* configure.in: Move generic linux case to end. Copy generic
linux noconfigdirs to mips*-*-linux* entry and new
powerpc64*-*-linux* entry. Add target-libffi for the latter.
* flags.h: Declare flag_finite_math_only.
Use it in definition of HONOR_NANS and
HONOR_INFINITIES.
* c-common.c (cb_register_builtins): Emit
__FINITE_MATH_ONLY__ when flag_finite_math_only
is set.
* combine.c (simplify_if_then_else): If
flag_finite_math_only is set, a == b has a
definite value.
* toplev.c: Initialize flag_finite_math_only.
(set_flags_fast_math): Set it on -ffast-math.
(flag_fast_math_set_p): Test it.
doc:
* invoke.texi: Document -ffinite-math-only.
f:
* com.c (ffe_init_options): Set
flag_finite_math_only.
* invoke.texi: Document -fno-finite-math-only.
David Edelsohn [Tue, 30 Jul 2002 21:23:46 +0000 (21:23 +0000)]
rs6000.c (rs6000_expand_unop_builtin): Check icode not CODE_FOR_nothing.
2002-07-30 David Edelsohn <edelsohn@gnu.org>
Zack Weinberg <zack@codesourcery.com>
* rs6000.c (rs6000_expand_unop_builtin): Check icode not
CODE_FOR_nothing. Change switch to if.
(rs6000_expand_binop_builtin): Same.
(rs6000_expand_builtin): Expand builtin if target support enabled.
(rs6000_init_builtins): Init builtin if target support enabled.
(rs6000_common_init_builtins): Check icode not CODE_FOR_nothing.
Roger Sayle [Tue, 30 Jul 2002 02:19:43 +0000 (02:19 +0000)]
builtins.c (expand_builtin): Change the default behavior to only issue an error if...
* builtins.c (expand_builtin): Change the default behavior to
only issue an error if the builtin function doesn't have a
fallback library call. Remove several cases handled by the
new default.
real.c (ieee_24, [...]): Define only if the floating point format of the target is IEEE.
* real.c (ieee_24, ieee_53, ieee_64, ieee_113): Define only if the
floating point format of the target is IEEE.
* (dec_f, dec_d, dec_g, dec_h): Define only if the floating point
format of the target is DEC.