1999-07-26 Andrew Haley <aph@cygnus.com>
* config/m32r/initfini.c (__init): Use a full word immediate for
__fini: this allows it to be placed in any memory region.
* config/m32r/t-m32r: Compile crtinit.o and crtfini.o for
-mmodel=medium. This is OK for all memory models.
From-SVN: r28266
* cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
(ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
(strip_top_quals): Declare.
(ncp_convert): Likewise.
(type_after_usual_arithmetic_converions): Likewise.
(composite_pointer_type): Likewise.
* call.c (strip_top_quals): Don't make it static.
(promoted_arithmetic_type_p): New function.
(conditional_conversion): Likewise.
(null_ptr_cst_p): Allow `false' as a NULL pointer constant.
(standard_conversion): Use same_type_p. Don't build BASE_CONVs
for converting a type to itself.
(reference_binding): Honor LOOKUP_NO_TEMP_BIND.
(implicit_conversion): Make sure the from and to types are
complete.
(add_builtin_candidate): Correct handling of ?: operator.
(add_builtin_candidates): Improve documentation.
(build_conditional_expr): New function.
(can_convert): Implement in terms of can_convert_arg.
(ncp_convert): New function.
* typeck.c (type_after_usual_arithmetic_conversions): New
function, split out from common_type.
(composite_pointer_type): New function, split out from
build_conditional_expr.
(common_type): Use type_after_usual_arithmetic_conversions.
Remove redundant attribute merging.
(comptypes): Tidy. Handle COMPLEX_TYPE.
(build_binary_op_nodefault): Use null_ptr_cst_p.
(build_conditional_expr): Remove.
(convert_for_assignment): Use new conversion functions.
* cp-tree.h (abstract_virtuals_error): Change declaration.
* typeck2.c (abstract_virtuals_error): Check to see if an error
ocurred, and return a boolean value accordingly.
(build_functional_cast): Adjust accordingly.
* class.c (finish_struct_1): Likewise.
* cvt.c (ocp_convert): Likewise.
* decl.c (cp_finish_decl): Likewise.
(grokparams): Likewise.
(grok_op_properties): Likewise.
(start_function): Likewise.
* init.c (build_new_1): Likewise.
* pt.c (unify): Don't get confused by pointers-to-member functions.
* search.c (build_cplus_new): Robustify.
From-SVN: r28262
* arc.h (EXPAND_BUILTIN_VA_START): New.
(EXPAND_BUILTIN_VA_ARG): New.
* arc.c (arc_setup_incoming_varargs): Set alias set of
varargs save area.
(arc_va_start): New.
(arc_va_arg): New.
From-SVN: r28254
* gjavah.c (print_stub): New function.
(METHOD_IS_NATIVE): New macro.
(print_mangled_classname): Make static.
(HANDLE_END_FIELD): Don't emit fields during stub generation.
(process_file): Perform stub generation.
(HANDLE_METHOD): Don't emit class decls during stub
generation.
(HANDLE_END_METHOD): Take into account stub generation.
(print_method_info): Handle stub generation.
(print_stub): New function.
(print_cxx_classname): Make signature consistant with others.
(help): Describe -stubs option.
(main): Create stub file.
(version): Use version.c.
(print_full_cxx_name): New function.
(print_c_decl): Use print_full_cxx_name.
From-SVN: r28236
* lex.c: Sync with C frontend.
(whitespace_cr): New fn.
(skip_white_space): Use it.
(init_parse): Reorder.
(yyprint): Support CONSTANT.
(pragma_getc, pragma_ungetc): Bring back.
(read_line_number): Change in_system_header directly.
(handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
(parse_float): Update to C version.
(yylex): Handle '$' under the letter case.
Remove looking_for_typename handling.
Support hex floating point constants.
Follow C's lead for choosing type of integer constants.
Rearrange stuff to match C frontend.
(yyungetc, reinit_parse_for_block, yylex): Support indent_level.
* spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
From-SVN: r28230
* call.c (reference_binding): Tweak.
(mayble_handle_implicit_object): Use direct_reference_binding to
create the right implicit conversion sequence.
From-SVN: r28228
* config/arm/arm.h (TARGET_SWITCHES): Add
-m{no-}single-pic-base. Correct help string for -mshort-load-words.
(TARGET_OPTIONS): Add -mpic-register=.
(ARM_FLAG_SINGLE_PIC_BASE, TARGET_SINGLE_PIC_BASE): Define.
(arm_pic_register_string): Declare.
(NEED_PLT_GOT): Delete, replace with ...
(NEED_GOT_RELOC, NEED_PLT_RELOC): ... these. New macros.
(OUTPUT_INT_ADDR_CONST): Replace NEED_PLT_GOT with NEED_GOT_RELOC.
(ASM_OUTPUT_MI_THUNK): Replace NEED_PLT_GOT with NEED_PLT_RELOC.
* config/arm/arm.c (arm_override_options): Add new option
-mpic-register=N.
(arm_pic_register_string): New variable.
(arm_finalize_pic): Respect TARGET_SINGLE_PIC_BASE.
(output_func_prologue): If TARGET_SINGLE_PIC_BASE, treat the PIC
register as never live. Use NEED_PLT_RELOC not NEED_PLT_GOT.
(output_return_instruction): Likewise.
* config/arm/elf.h (NEED_PLT_GOT): Delete, replace with ...
(NEED_GOT_RELOC, NEED_PLT_RELOC): ... these. Define to flag_pic.
* config/arm/arm.md: Use NEED_PLT_RELOC in place of NEED_PLT_GOT.
* invoke.texi (ARM Options): Fix spelling. Remove duplicate
mention of -msched-prolog. Document new options -msingle-pic-base
and -mpic-register=.
From-SVN: r28227
* call.c (NEED_TEMPORARY_P): New macro.
(standard_conversion): Set it, for derived-to-base conversions.
(reference_related_p): New function.
(reference_compatible_p): Likewise.
(convert_class_to_reference): Likewise.
(direct_reference_binding): Likewise.
(reference_binding): Rework for standards-compliance.
(convert_like): Adjust accordingly.
(maybe_handle_ref_bind): Simplify; the right conversion sequences
are now built up in reference_binding.
(initialize_reference): New function.
* cp-tree.h (ICS_USER_FLAG): Document.
(ICS_THIS_FLAG): Likewise.
(ICS_BAD_FLAG): Likewise.
(NEED_TEMPORARY_P): Likewise.
(cp_lvalue_kind): New type.
(real_lvalue_p): Return it.
* error.c (dump_expr): Provide more accurate representation for
AGGR_INIT_EXPRs.
* init.c (expand_default_init): Do not try to perform implicit
conversions for a brace-enclosed initializer.
* search.c (lookup_conversions): Document.
* tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
appropriately.
(real_lvalue_p): Adjust accordingly.
(lvalue_p): Likewise.
(build_cplus_new): Don't allow the creation of an abstract class.
* typeck.c (convert_for_initialization): Use initialize_reference.
From-SVN: r28221
* defaults.h (DWARF2_GENERATE_TEXT_SECTION_LABEL): New macro.
* tm.texi (DWARF2_GENERATE_TEXT_SECTION_LABEL): Define it.
* dwarf2out.c (dwarf2out_init): Don't output a label to mark the
start of the text section if DWARF2_GENERATE_TEXT_SECTION_LABEL is
false.
* config/mips/iris6.h (DWARF2_GENERATE_TEXT_SECTION_LABEL):
Define to zero.
From-SVN: r28213
1999-07-15 Andrew Haley <aph@cygnus.com>
* lang.c (flag_use_divide_subroutine): New variable.
* typeck.c: (convert_ieee_real_to_integer): Bounds check
fp-to-integer conversion.
(convert): Call convert_ieee_real_to_integer when flag_fast_math
is not set.
* expr.c (build_java_soft_divmod): New function.
(build_java_binop): Call build_java_soft_divmod if
flag_use_divide_subroutine is set.
* decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
soft_lrem_node: new builtin functions.
(init_decl_processing) Initialize the new builtins.
* java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
soft_lrem_node: new builtin functions.
(build_java_soft_divmod): New function.
* parse.y: Call build_java_soft_divmod if
flag_use_divide_subroutine is set.
* parse.c: Rebuilt.
* jvspec.c (lang_specific_driver): Always allow an extra arg (for
a --specs= arg) even if not linking.
* lang-options.h (DEFINE_LANG_NAME ("Java")): Add
-fuse-divide-subroutine
From-SVN: r28209
1999-07-15 Andrew Haley <aph@cygnus.com>
* lang.c (flag_use_divide_subroutine): New variable.
* typeck.c: (convert_ieee_real_to_integer): Bounds check
fp-to-integer conversion.
(convert): Call convert_ieee_real_to_integer when flag_fast_math
is not set.
* expr.c (build_java_soft_divmod): New function.
(build_java_binop): Call build_java_soft_divmod if
flag_use_divide_subroutine is set.
* decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
soft_lrem_node: new builtin functions.
(init_decl_processing) Initialize the new builtins.
* java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
soft_lrem_node: new builtin functions.
(build_java_soft_divmod): New function.
* parse.y: Call build_java_soft_divmod if
flag_use_divide_subroutine is set.
From-SVN: r28208