Jason Merrill [Tue, 16 Mar 1999 19:34:49 +0000 (19:34 +0000)]
method.c (old_backref_index): Split out...
* method.c (old_backref_index): Split out...
(flush_repeats): From here. Rename back from try_old_backref.
(build_mangled_name): Put back some old-style repeat handling.
Zack Weinberg [Tue, 16 Mar 1999 13:10:15 +0000 (13:10 +0000)]
cppfiles.c (read_and_prescan): Map backslash-newline to '\r' (which cannot otherwise appear in the processed...
1999-03-16 16:06 -0500 Zack Weinberg <zack@rabi.columbia.edu>
* cppfiles.c (read_and_prescan): Map backslash-newline to '\r'
(which cannot otherwise appear in the processed buffer) and
move it out of tokens that it appears in the middle of.
Improve performance.
(find_position): New function.
* cpplib.c: \r (one character) indicates backslash
newline, not \\\n (two characters). It cannot appear in the
middle of a token. Call CPP_BUMP_LINE (pfile) whenever
parsing moves past \n or \r. Increment pfile->lineno whenever
a \n is placed into token_buffer. Only one mark can exist at
a time, and CPP_BUMP_LINE must not be used while it is
active. It is automatically cleared by cpp_pop_buffer and
parse_goto_mark. \r is not in is_hor_space or is_space.
(NEWLINE_FIX, NEWLINE_FIX1, adjust_position,
update_position, count_newlines, parse_move_mark): Removed.
(parse_string, copy_comment): New functions.
(parse_name): Returns void.
(parse_set_mark, parse_clear_mark, parse_goto_mark): Take only
one argument, a cpp_reader *. Change for new marking scheme.
(skip_comment): Handle CHILL line comments too. Second
argument is now first character of comment marker; all callers
changed. Issue error for unterminated block comment here.
(cpp_skip_hspace): Recognize CHILL comments.
(copy_rest_of_line): Likewise. Call skip_comment and
parse_string directly, don't go through cpp_get_token. Emit
"/**/" for block comments if -traditional (create_definition
needs this).
(do_define): Don't play with put_out_comments.
(cpp_push_buffer): Initialize ->mark to -1.
(cpp_buf_line_and_col): Just read out the values in the buffer
structure.
(output_line_command): Use cpp_buf_line_and_col. Fix
formatting. Remove stale code.
(cpp_get_token): Break out string parsing code to
parse_string. Use skip_comment for CHILL comments too. Use
copy_comment for put_out_comments instead of dinking with
marks. Remove stale code. Don't call output_line_command
unless it's necessary.
* cpplib.h (parse_marker): Removed.
(struct cpp_buffer): line_base is now a unsigned char *; add
`mark' [long], remove `marks' [struct parse_marker *].
(parse_set_mark, parse_clear_mark, parse_goto_mark): Update
prototypes.
(CPP_BUMP_LINE, CPP_BUMP_BUFFER_LINE): New macros.
* cppinit.c (is_hor_space, is_space): '\r' is not considered
whitespace.
* cppexp.c (cpp_parse_expression): Use cpp_skip_hspace, not
SKIP_WHITE_SPACE.
* cpphash.c (macarg): Disable line commands while expanding.
Gavin Romig-Koch [Tue, 16 Mar 1999 08:33:24 +0000 (08:33 +0000)]
c-lex.c (yylex): Remove warning for integer literals being larger than the largest target int.
* c-lex.c (yylex) : Remove warning for integer literals being
larger than the largest target int. Add warning for integer
literal being larger than than its choosen type.
Gavin Romig-Koch [Tue, 16 Mar 1999 08:04:00 +0000 (08:04 +0000)]
invoke.texi: Add -mlong32 documentation.
* invoke.texi: Add -mlong32 documentation.
* config/mips/mips.h (mips_explicit_type_size_string): New.
(TARGET_SWITCHES): Add 'long32'.
(TARGET_OPTIONS): Add 'explicit-type-size'.
(CC1_SPECS): Set -mexplicit-type-size.
(LONG_MAX_SPEC): Change a use of 'no-long64' to 'long32'.
* config/mips/abi64.h (LONG_MAX_SPEC): Same. Add 'mabi=32'.
* config/mips/mips.c (mips_explicit_type_size_string): New.
(override_options): Use it.
* config/mips/osfrose.h (CC1_SPECS): Set -mexplicit-type-size.
* config/mips/mips.h (SUBTARGET_CPP_SIZE_SPEC):
Pointer size now depends on both size longs and size of GP
registers.
Gavin Romig-Koch [Tue, 16 Mar 1999 07:25:31 +0000 (07:25 +0000)]
iris.h (CTORS_SECTION_ASM_OP,DTORS_SECTION_ASM_OP, [...]): Use Pmode == DImode rather than TARGET_LONG64.
* config/mips/iris.h (CTORS_SECTION_ASM_OP,DTORS_SECTION_ASM_OP,
dtors_section): Use Pmode == DImode rather than TARGET_LONG64.
* config/mips/mips.c (override_options): Allow -mlong64 and
-mint64 with -mips2 or less.
* config/mips/mips.h (MASK_LONG64): Fix comment.
(POINTER_SIZE): Use Pmode == DImode rather than TARGET_LONG64.
(Pmode): Make Pmode the smaller of longs or gp registers.
* invoke.texi: Note the new size for pointers.
parse.y (java_stabilize_reference): Use save_expr instead of building a SAVE_EXPR node.
1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_stabilize_reference): Use save_expr instead of
building a SAVE_EXPR node.
(java_complete_lhs): Patch the resulting string of the `+='
operator (if necessary) and complete the RHS after having built
the cast.
David Edelsohn [Mon, 15 Mar 1999 19:47:42 +0000 (19:47 +0000)]
bit-pattern directly.
(ASM_OUTPUT_REG_{PUSH,POP}): Delete.
* rs6000.c (first_reg_to_save): If profiling and context needed,
allocate a reg to save static chain for all ABIs. For AIX
profiling, calculate parameter registers to save based on need.
(output_function_profiler): Save and restore static chain around
profile call for all ABIs.
Zack Weinberg [Mon, 15 Mar 1999 18:42:46 +0000 (18:42 +0000)]
cppinit.c: Instead of one pending list...
1999-03-15 21:39 -0500 Zack Weinberg <zack@rabi.columbia.edu>
* cppinit.c: Instead of one pending list, keep separate lists
for each category of pending option: -D/-U, -A, -include,
-imacros. Move the four partial include-path lists into the
pending block. Use head and tail pointers so we don't ever
have to reverse the lists.
(cpp_start_read): Break out blocks of code to their own
functions: install_predefs and initialize_dependency_output.
Use path_include for C_INCLUDE_PATH and friends as well as
CPATH. Remove include_defaults gunk. Warn about the
combination of -lang-chill and -trigraphs. Optimize string
bashing. Walk each pending list once, deallocating as we go.
(append_include_chain): Brought over from cppfiles.c. Mark
dirs as system include dirs if and only if appending to
system include path. If opts->verbose, print a notice when a
dir is dropped from the include path because it doesn't
exist. Fix memory leak: this function is not supposed to copy
its DIR argument.
(nreverse_pending, push_pending): Removed.
(APPEND): New macro for adding to pending lists.
(path_include): Can now add to any partial include path.
(base_name): Bring over from cccp.c.
(cpp_options_init): Allocate the pending block.
(cpp_handle_option): Add --version. Exit after --help. Fix
formatting. Order -ifoo options by frequency of usage.
(install_predefs): New function, simplified version of code
that was in cpp_start_read.
(initialize_dependency_output): Likewise. Understand OBJECT_SUFFIX.
* cppfiles.c (simplify_pathname): Export.
(merge_include_chains): Don't nreverse the lists. If
opts->verbose, print a notice when a duplicate dir is detected
and dropped from the include path.
(finclude): Fix excessive cleverness in setting
fp->system_header_p.
(actual_directory): Set x->sysp from
CPP_BUFFER (pfile)->system_header_p so that one system header
may include another with "".
(deps_output): Fix double adjustment of deps_size which would
cause all dependencies after the first two lines to be lost.
* cpplib.c (cpp_unassert): New function.
* cpplib.h: Lay out struct cpp_pending here. Adjust
prototypes. Add include_prefix_len to struct cpp_options.
Jim Wilson [Mon, 15 Mar 1999 15:08:51 +0000 (15:08 +0000)]
mips.h (REGISTER_MOVE_COST): Make the cost of moving from HI/LO/HILO/MD into general registers the same as...
Mon Mar 15 16:01:52 1999 Jim Wilson <wilson@cygnus.com>
* config/misp/mips.h (REGISTER_MOVE_COST): Make the cost of moving
from HI/LO/HILO/MD into general registers the same as for one
of moving general registers to HI/LO/HILO/MD.
Per Bothner [Mon, 15 Mar 1999 13:09:47 +0000 (05:09 -0800)]
class.c (make_class): Don't set CLASS_P here (because this function is also called by...
* class.c (make_class): Don't set CLASS_P here (because
this function is also called by build_java_array_type).
(push_class): Set CLASS_P here instead.
* parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
* jcf-dump.c (print_access_flags): Take extra parameter to indicate
context. If the context is class, perfer "super" over "synchronized".
* jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
* parse.y (create_class): Don't call parser_check_super here;
it is not robust. Always wait until later.
* parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
match what JDK 1.2 does), but don't set ACC_PUBLIC.
Per Bothner [Mon, 15 Mar 1999 13:09:44 +0000 (05:09 -0800)]
class.c (make_class): Don't set CLASS_P here (because this function is also called by...
d
* class.c (make_class): Don't set CLASS_P here (because
this function is also called by build_java_array_type).
(push_class): Set CLASS_P here instead.
* parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
* jcf-dump.c (print_access_flags): Take extra parameter to indicate
context. If the context is class, perfer "super" over "synchronized".
* jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
* parse.y (create_class): Don't call parser_check_super here;
it is not robust. Always wait until later.
* parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
match what JDK 1.2 does), but don't set ACC_PUBLIC.
Per Bothner [Mon, 15 Mar 1999 13:09:36 +0000 (05:09 -0800)]
class.c (make_class): Don't set CLASS_P here (because this function is also called by...
a
* class.c (make_class): Don't set CLASS_P here (because
this function is also called by build_java_array_type).
(push_class): Set CLASS_P here instead.
* parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
* jcf-dump.c (print_access_flags): Take extra parameter to indicate
context. If the context is class, perfer "super" over "synchronized".
* jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
* parse.y (create_class): Don't call parser_check_super here;
it is not robust. Always wait until later.
* parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
match what JDK 1.2 does), but don't set ACC_PUBLIC.
Per Bothner [Mon, 15 Mar 1999 13:09:32 +0000 (05:09 -0800)]
class.c (make_class): Don't set CLASS_P here (because this function is also called by...
T
* class.c (make_class): Don't set CLASS_P here (because
this function is also called by build_java_array_type).
(push_class): Set CLASS_P here instead.
* parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
* jcf-dump.c (print_access_flags): Take extra parameter to indicate
context. If the context is class, perfer "super" over "synchronized".
* jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
* parse.y (create_class): Don't call parser_check_super here;
it is not robust. Always wait until later.
* parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
match what JDK 1.2 does), but don't set ACC_PUBLIC.
Mark Mitchell [Mon, 15 Mar 1999 09:25:01 +0000 (09:25 +0000)]
reload.c (find_reloads): Add a REG_LABEL note if we substitute a LABEL_REF for something else.
Mon Mar 15 10:20:20 1999 Mark Mitchell <mark@markmitchell.com>
* reload.c (find_reloads): Add a REG_LABEL note if we substitute a
LABEL_REF for something else.
Kaveh R. Ghazi [Mon, 15 Mar 1999 05:30:02 +0000 (05:30 +0000)]
fold-const.c (exact_real_inverse): Move variable `float_error' into the scope where it is used.
* fold-const.c (exact_real_inverse): Move variable `float_error'
into the scope where it is used.
(const_binop_1): New static function.
(cb_args): New struct.
(const_binop): Use them in call to `do_float_handler'.
(fold_convert_1): New static function.
(fc_args): New struct.
(fold_convert): Use them in call to `do_float_handler'.
Michael Hayes [Mon, 15 Mar 1999 01:52:49 +0000 (01:52 +0000)]
rtlanal.c (auto_inc_p): New function.
* rtlanal.c (auto_inc_p): New function.
* rtl.h (auto_inc_p): Prototype it.
* reload1.c (add_auto_inc_notes): New function.
(reload): Strip REG_INC notes and call add_auto_inc_notes
for each insn to restore them correctly.
Kaveh R. Ghazi [Sun, 14 Mar 1999 14:02:10 +0000 (14:02 +0000)]
cse.c (check_fold_consts): New static function.
* cse.c (check_fold_consts): New static function.
(cfc_args): New struct.
(simplify_relational_operation): Use them in call to
`do_float_handler'.
* toplev.c (do_float_handler): New function to wrap calls to
setjmp/set_float_handler.
* toplev.h (do_float_handler): Add extern prototype.
* tree.c (build_real_from_int_cst_1): New static function.
(brfic_args): New struct.
(build_real_from_int_cst): Use them in call to
`do_float_handler'.
Jason Merrill [Sun, 14 Mar 1999 01:29:36 +0000 (01:29 +0000)]
decl.c (duplicate_decls): Use same_type_p.
* decl.c (duplicate_decls): Use same_type_p.
* method.c (try_old_backref): Renamed from flush_repeats. Use
same_type_p. Don't try to handle repeats. Return success.
(is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
calls from old-style code, too.
(check_ktype): Use same_type_p.
(check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
(build_qualified_name): Simplify logic.
(build_mangled_name_for_type_with_Gcode): Remove call to
type_canonical_variant.
(process_overload_item): Strip typedefs and quals at the top.
(build_mangled_name): Likewise. Remove support for old-style
repeats, which have been disabled since 2.7.2. Don't mess with
TREE_USED.
(build_decl_overload_real): Don't mess with TREE_USED.
Richard Earnshaw [Sat, 13 Mar 1999 11:40:25 +0000 (11:40 +0000)]
arm.c (arm_split_constant): Don't try to force a constant to memory after arm_reorg has run.
* arm.c (arm_split_constant): Don't try to force a constant to
memory after arm_reorg has run.
(after_arm_reorg): New static variable.
(arm_reorg): Set it.
(output_func_epilogue): Clear it.
Nathan Sidwell [Sat, 13 Mar 1999 01:49:14 +0000 (01:49 +0000)]
error.c (cp_printers): Add 'F' escape character.
* error.c (cp_printers): Add 'F' escape character.
(dump_type_real): Remove TREE_LIST (fnargs) printing.
Functionality moved to dump_parameters.
(dump_type_suffix): Use dump_parameters and dump_exception_spec.
(dump_function_decl): Extend meaning of V parameter. Use
dump_parameters and dump_exception_spec.
(dump_parameters): New static function.
(dump_exception_spec): New static function.
(fndecl_as_string): Change argument semantics. Use
dump_function_decl directly.
* sig.c (build_signature_table_constructor): Use cp_error.
* semantics.c (finish_switch_cond): Handle error cases gracefully.
Detected by g++.law/enum5.C
* typeck.c (build_modify_expr): Check for errors after resolving
offsets. Detected by g++.brendan/static1.C
* decl.c (complete_array_type): Ignore initial_value if it is an
error. Detected by g++.benjamin/17930.C
* typeck2.c (process_init_constructor): Return error if one argument
is in error. Detected by g++.benjamin/13478.C
parse.y (java_stabilize_reference): Return NODE when patching a COMPOUND_EXPR.
1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_stabilize_reference): Return NODE when patching a
COMPOUND_EXPR.
(java_complete_lhs): Put parenthesis around truth values.
1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class_method): Don't make rtl for interface
methods.
* parse.h (GET_TYPE_NAME): New macro.
* parse.y (if_then_statement:): Fixed indentation.
(if_then_else_statement:): Likewise.
(for_statement:): Fixed spacing.
(try_statement:): Fixed indentation.
(create_interface): Don't force interfaces to be abstract.
(method_header): Abstract methods are OK in interfaces.
(declare_local_variables): Fixed typo in comment.
(java_complete_expand_method): Fixed indentation.
(resolve_qualified_expression_name): Use GET_TYPE_NAME to report
non accessible fields.
(java_stabilize_reference): New function.
(java_complete_lhs): Fixed indentation. Use
java_stabilize_reference in compound assignement. Insert the
cast. If not processing `+' fix string constants before processing
binop.
Kaveh R. Ghazi [Fri, 12 Mar 1999 17:13:24 +0000 (17:13 +0000)]
Warning fixes:
* constants.c (find_class_or_string_constant): Cast variable `j'
to a `jword' when comparing against one.
* expr.c (java_lang_expand_expr): Remove unused variables
`has_finally_p' and `op0'.
* gjavah.c (print_field_info): Cast a value to jint when comparing
against one. Likewise for a jlong.
(add_namelet): Likewise cast a `sizeof' to an int when comparing
against a signed quantity.
* jcf-dump.c (print_signature_type): Remove unused variable `digit'.
(print_signature): Don't needlessly dereference variable `str'
* jcf-reader.c (get_attribute): Mark variables `max_stack' and
`max_locals' with ATTRIBUTE_UNUSED.
(jcf_parse_class): Likewise for variable `index'.
* parse.h (reverse_jdep_list): Remove static prototype.
* parse.y (build_jump_to_finally): Remove prototype and definition.
(reverse_jdep_list): Add static prototype.
* typeck.c (convert_ieee_real_to_integer): Remove unused variables
`assignment' and `expr_decl'.
* verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
Andrew Haley [Fri, 12 Mar 1999 07:52:58 +0000 (07:52 +0000)]
jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes...
1999-03-12 Andrew Haley <aph@cygnus.com>
* jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
we'll need a directory separator and a null character.
Mumit Khan [Thu, 11 Mar 1999 00:58:01 +0000 (00:58 +0000)]
cppfiles.c (INO_T_EQ): Handle UWIN.
* cppfiles.c (INO_T_EQ): Handle UWIN.
* c-common.c (decl_attributes): Flag unrecognized attribute
functions as warnings instead of as errors.
Support for i386-pc-uwin.
* i386/uwin.h: New file.
* i386/xm-uwin.h: New file.
* i386/t-uwin: New file.
* i386/uwin.asm: New file.
* configure.in (i[3456]86-*-uwin*): Define.
Add Workaround for vfork bug when hosted on uwin.
* configure: Regenerate.
* cccp.c (INO_T_EQ): Undefine. UWIN has inodes.
(absolute_filename): UWIN uses POSIX pathnames only.
* libgcc2.c (getpagesize): Do not define for UWIN.
(mprotect): Likewise.
* protoize.c (dirent.h): Conditionally include.
(fputc): Prototype only if it's not a macro.