* 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
* c-lex.c (yylex) : Correct the test for overflow when lexing
integer literals.
For gcc/cp:
* lex.c (real_yylex) : Correct the test for overflow when lexing
integer literals.
From-SVN: r28206
* decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
not DECL_BUILT_IN, to determine if a function is internally declared.
(duplicate_decls): Likewise. Improve handling of builtins.
(push_overloaded_decl): Remove special handling of builtins.
* cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
* decl.c (grokdeclarator): Pull out decl_constant_value in
templates, too.
* class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
* cp-tree.h, pt.c, semantics.c: Adjust.
* method.c (largest_union_member): Remove.
From-SVN: r28204
* haifa-sched.c (insn_cost): FREE implies cost 0 and vice versa.
(adjust_priority): Always call ADJUST_PRIORITY.
(schedule_insn): Only put insns into the ready at cost 0.
(schedule_block): Remove redundant initial sort. Give clock_var
and can_issue_more to MD_SCHED_REORDER. Requeue if hazard cost
is not 0.
* tm.texi (MD_SCHED_REORDER): Update docs.
* sparc.h (MD_SCHED_REORDER): Update. Set CAN_ISSUE_MORE.
* sparc.c (ultra_reorder_called_this_block): Delete.
(ultrasparc_sched_init): Don't set it.
(ultrasparc_sched_reorder): Don't check it.
From-SVN: r28201
* rs6000.h (struct rs6000_args): Add sysv_gregno.
* rs6000.c (init_cumulative_args): Init sysv_gregno.
(function_arg_boundary): Align DFmode.
(function_arg_advance): Restructure for ABI_V4; use sysv_gregno
to get fp reg and stack overflow correct.
(function_arg): Likewise.
(function_arg_pass_by_reference): True for TFmode for ABI_V4.
(setup_incoming_varargs): Restructure for ABI_V4; use
function_arg_advance to skip final named argument.
(expand_builtin_saveregs): Properly unskip the last integer arg
when doing varargs. Adjust overflow location calculation.
* ginclude/va-ppc.h (struct __va_list_tag): Make gpr and fpr
explicitly unsigned.
(__VA_FP_REGSAVE): Use new OFS argument instead of AP->fpr directly.
(__VA_GP_REGSAVE): Similarly.
(__va_longlong_p): Delete.
(__va_arg_type_violation): New declaration.
(va_arg): Restructure. Flag promotion errors. Align double.
TFmode passed by reference.
* rs6000.md (movdi_32+1): Use GEN_INT after arithmetic
in the HOST_BITS_PER_WIDE_INT > 32 case.
From-SVN: r28199
Tue Jul 20 13:20:05 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_and_layout): Check methods only once.
(resolve_qualified_expression_name): Verify thrown exceptions
compatibility.
(check_thrown_exceptions): Reject exceptions thrown in
initializer. Error message tuned.
(This fixes PR #12. Libgcj's java/net must be updated in order to compiles
with a patch at this URL:
http://sourceware.cygnus.com/ml/java-patches/1999-q3/msg00048.html)
From-SVN: r28196
* lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
* lex.c (token_getch, token_put_back): New fns.
(real_yylex): Use them.
* lex.c (lang_init): Generalize.
(lang_init_options): Tell cpplib this is C++.
(nextchar): Remove. Replace uses with put_back.
(skip_white_space): Handle linemode here. Optimize for cpplib.
(extend_token_buffer_to): New fn.
(extend_token_buffer): Use it.
(read_line_number, check_newline): Just deal with tokens.
(real_yylex): More cpplib optimizations. Simplify. Don't produce
EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
* spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
* parse.y (PAREN_STAR_PAREN): Remove.
* input.c: Don't use the putback machinery with cpplib.
(sub_getch): Fold back into getch.
(getch): Don't handle linemode here.
(feed_input): Unget any text in the token buffer.
* lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
nextyychar, nextyylval): Remove.
* lex.c (indent_level): New variable.
(init_parse): Set cpp_token to CPP_DIRECTIVE.
(consume_string): Make this smart about USE_CPPLIB.
(yyungetc): Use put_back function.
(pragma_getc, pragma_ungetc): Functions deleted.
(check_newline): Rewrite to be intelligent about USE_CPPLIB.
Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
pragma_ungetc.
(real_yylex): Rewrite to be intelligent about USE_CPPLIB.
Also, clean up cases where we redundantly set token_buffer[0].
(read_line_number): New fn.
* input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
(end_input): Call cpp_pop_buffer if USE_CPPLIB.
(sub_getch): Conditionalize out code that's not appropriate if
USE_CPPLIB.
(put_back): Rewrite in case USE_CPPLIB is defined.
(input_redirected): Ditto.
From-SVN: r28193
* c-common.h: New file.
* c-common.c (permanent_obstack): Delete unused declaration.
(c_global_trees): New array.
(c_common_nodes_and_builtins): New function; split off common code
from init_decl_processing in both c-decl.c and cp/decl.c.
* c-tree.h: Delete lots of declarations of tree nodes; replaced by
c_global_trees and accessor macros defined in c-common.h.
Include c-common.h.
* c-decl.c: Delete definitions for tree nodes that were replaced by
c_global_trees.
(init_decl_processing): Build void_list_node.
Call c_common_nodes_and_builtins; delete code to generate the common
builtins here.
* objc/objc-act.c (build_module_descriptor): Rename variable
void_list_node to avoid clash with c-common.h.
* cp/cp-tree.h: Delete lots of declarations of tree nodes; replaced by
c_global_trees and accessor macros defined in c-common.h.
(cp_tree_index): New enumeration.
(cp_global_trees): Declare new array. Add accessor macros for it, and
delete declarations of tree nodes replaced by it.
(builtin_function): Delete macro, add declaration for new function.
Include c-common.h.
* cp/decl.c: Delete definitions for tree nodes that were replaced by
cp_global_trees and c_global_trees.
(init_decl_processing): Call c_common_nodes_and_builtins; delete code
to generate the common builtins here.
(builtin_function): New function.
* cp/decl2.c (abort_fndecl): Delete declaration.
* cp/except.c (expand_builtin_return_address): Delete declaration.
(builtin_return_address_fndecl): Delete variable.
(const_ptr_type_node): Delete declaration.
* cp/lex.c (cons_up_default_function): Delete declaration of
void_list_node.
* cp/parse.y (void_list_node): Delete declaration.
* cp/rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
Delete variables.
(const_string_type_node): Delete declaration.
* cp/search.c (abort_fndecl): Delete declaration.
* Makefile.in: Update dependencies.
* objc/Make-lang.in: Likewise.
* cp/Makefile.in: Likewise.
From-SVN: r28188