Commit Graph

26180 Commits

Author SHA1 Message Date
Kaveh R. Ghazi
b9ff481444 diagnostic.c (build_message_string, [...]): Add ATTRIBUTE_PRINTF_*.
* diagnostic.c (build_message_string, output_printf,
        line_wrapper_printf): Add ATTRIBUTE_PRINTF_*.
        (build_location_prefix): Fix non-literal format string.

From-SVN: r31669
2000-01-28 16:34:00 +00:00
Nathan Sidwell
7267d6924e Compiler side new abi rtti (not enabled).
* cp-tree.h (new_abi_rtti_p): New macro.
	(emit_support_tinfos): Prototype new function.
	(tinfo_decl_p): Likewise.
	(emit_tinfo_decl): Likwise.
	* rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
	macros.
	(doing_runtime): New local static.
	(init_rtti_processing): Add new-abi initializer.
	(get_tinfo_decl): Add new-abi logic.
	(tinfo_from_decl): Likewise.
	(build_dynamic_cast_1): Likewise.
	(qualifier_flags): New static function.
	(tinfo_base_init): Likewise.
	(generic_initializer): Likewise.
	(ptr_ref_initializer): Likewise.
	(ptmd_initializer): Likewise.
	(class_hint_flags): Likewise.
	(class_initializer): Likewise.
	(synthesize_tinfo_var): Likewise.
	(create_real_tinfo_var): Likewise.
	(create_pseudo_type_info): Likewise.
	(get_vmi_pseudo_type_info): Likewise.
	(create_tinfo_types): Likewise.
	(emit_support_tinfos): New global function.
	(tinfo_decl_p): New global predicate.
	(emit_tinfo_decl): New global function.
	* class.c (set_rtti_entry): Generalize for old and new rtti.
	(build_vtbl_initializer): Likewise.
	* decl2.c (finish_file): Likewise.

From-SVN: r31668
2000-01-28 13:30:13 +00:00
Jakub Jelinek
73565a7129 20000127-1.c: New test.
* compile/20000127-1.c: New test.
	* execute/991228-1.c: New test.

From-SVN: r31667
2000-01-28 12:54:37 +01:00
Martin v. Löwis
dfe50efb43 fstream.h (ifstream::ifstream): Add ios::in to mode.
* fstream.h (ifstream::ifstream): Add ios::in to mode.
	(ifstream::open): Likewise.
	(ofstream::ofstream): Add ios::out to mode.
	(ofstream::open): Likewise.

From-SVN: r31666
2000-01-28 09:55:33 +00:00
Jeff Law
e8ea81ec7d Daily bump.
From-SVN: r31664
2000-01-28 01:45:07 -07:00
Jim Wilson
aa1eac0c9f Fix winsup (cygwin) build failure with VLAs and inline functions.
* cp/optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
	and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).

From-SVN: r31663
2000-01-27 20:56:59 -08:00
Richard Henderson
138eff91a2 * alpha.md (trunctfsf2): New.
From-SVN: r31662
2000-01-27 20:36:43 -08:00
Mike Stump
0843179b2e Fix whitespace
From-SVN: r31661
2000-01-28 04:09:29 +00:00
Andrew Hobson
cd038ac239 * configure.in (alpha-dec-osf5): Enable MASK_SUPPORT_ARCH.
From-SVN: r31660
2000-01-27 19:00:01 -08:00
Zack Weinberg
d14cfa2af8 dbz.c, dbzmain.c: Include stdlib.h.
* dbz/dbz.c, dbz/dbzmain.c: Include stdlib.h.  Don't declare
	malloc, calloc, free, atol, atoi, or errno.  (errno.h was
	already being included.)

From-SVN: r31659
2000-01-28 01:21:49 +00:00
Zack Weinberg
c65ede6789 New test - core dump in cccp
From-SVN: r31658
2000-01-28 01:10:53 +00:00
Mike Stump
0d5b6c4bda testcase for recent checkin
From-SVN: r31656
2000-01-27 23:19:47 +00:00
Mike Stump
e905ac8a1a decl.c (pushdecl): Fix up shadow warnings with respect to implicit for scopes.
* decl.c (pushdecl): Fix up shadow warnings with respect to implicit
	for scopes.
Fixes for3.C

From-SVN: r31655
2000-01-27 23:15:38 +00:00
Zack Weinberg
75ec21db30 cppinit.c (cpp_handle_option): Recognize C++ comments under -std=gnu89.
* cppinit.c (cpp_handle_option): Recognize C++ comments under
	-std=gnu89.
	* cpplib.c (skip_block_comment, skip_line_comment): Split code
	out of...
	(skip_comment) ... here.  Permit C++ comments in system
	headers always.  Warn about C++ comments in user code under
	-std=gnu89 -pedantic.
	(copy_comment): Use skip_comment.
	(cpp_skip_hspace, cpp_get_token): skip_comment can no longer
	return EOF.
	(consider_directive_while_skipping, do_else, do_endif): Call
	validate_else unconditionally.
	(validate_else): Check CPP_PEDANTIC here.  Accept non-comment
	text after the conditional in a system header.
	* cpplib.h (struct cpp_buffer): Add flag
	warned_cplusplus_comments.

From-SVN: r31654
2000-01-27 22:29:07 +00:00
Zack Weinberg
73b5cdf98a Test cases for c++ comments and endif labels in system headers.
I made them up all by myself.

From-SVN: r31653
2000-01-27 22:27:24 +00:00
Zack Weinberg
35ac3890ec Use __inline not inline since test is compiled with -ansi
From-SVN: r31652
2000-01-27 21:42:03 +00:00
Geoff Keating
d1b8177961 emit-rtl.c (unshare_all_rtl): Unshare virtual parameters too.
* emit-rtl.c (unshare_all_rtl): Unshare virtual parameters too.
Use unshare_all_rtl_1.
(unshare_all_rtl_again): New function.
(unshare_all_rtl_1): New function split out of unshare_all_rtl.

* function.c (purge_addressof_1): Use unshare_all_rtl_again
rather than resetting the 'used' flags ourself.

* toplev.c (rest_of_compilation): Add current_function_decl
to the unshare_all_rtl call.
* tree.h: Prototype unshare_all_rtl.
* rtl.h: Prototype unshare_all_rtl_again here.

From-SVN: r31651
2000-01-27 20:46:26 +00:00
Geoff Keating
3bc9f12b33 genoutput.c (output_prologue): Include ggc.h in generated files.
* genoutput.c (output_prologue): Include ggc.h in generated
	files.
	* Makefile.in (insn-output.o): Depends on ggc.h.

From-SVN: r31650
2000-01-27 20:40:24 +00:00
Ian Dall
4c54e4e417 ns32k update from Ian Dall and Hans-Peter Nilsson.
Co-Authored-By: Hans-Peter Nilsson <hp@bitrange.com>

From-SVN: r31648
2000-01-27 11:20:51 -08:00
Andrew Haley
f85cedde61 jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
2000-01-27  Andrew Haley  <aph@cygnus.com>

        * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
        (emit_if): Ditto.
        (emit_jsr): Ditto.

From-SVN: r31647
2000-01-27 19:09:14 +00:00
Fred Fish
899905f6d3 gthr-posix.h: Fix typo; compatibily -> compatibility.
* gthr-posix.h: Fix typo; compatibily -> compatibility.
        * gthr-single.h: Likewise.
        * gthr-solaris.h: Likewise.
        * gthr-vxworks.h: Likewise.
        * gthr-win32.h: Likewise.
        * gthr.h: Likewise.

From-SVN: r31646
2000-01-27 10:49:12 -08:00
Zack Weinberg
9082f8471a cppinit.c: Add " (cpplib)" to end of string printed by -v / --version.
* cppinit.c: Add " (cpplib)" to end of string printed by
	-v / --version.

From-SVN: r31645
2000-01-27 18:37:50 +00:00
Joern Rennecke
28353b165e Reflect renaming of invariant_p to loop_invariant_p in comment.
From-SVN: r31644
2000-01-27 17:45:12 +00:00
Richard Henderson
01b9e84eb1 alpha.c (alpha_emit_conditional_move): Use VOIDmode when testing for a signed comparison.
* alpha.c (alpha_emit_conditional_move): Use VOIDmode when
        testing for a signed comparison.
        (alpha_emit_floatuns): New.
        * alpha-protos.h: Declare it.
        * alpha.md (floatunsdisf2, floatunsdidf2): New.
        (extendsfdf2): Tidy.

From-SVN: r31643
2000-01-27 02:17:37 -08:00
Jeff Law
ee8b0e7c08 Daily bump.
From-SVN: r31642
2000-01-27 01:45:07 -07:00
Jakub Jelinek
31cedf8946 linux64.h (CC1_SPEC): If compiling -m32 with -g but no -g option specifying debugging format...
* config/sparc/linux64.h (CC1_SPEC): If compiling -m32 with -g but
	no -g option specifying debugging format, default to -gstabs+.

From-SVN: r31641
2000-01-27 09:42:56 +01:00
Jason Merrill
24e2e58e0a pt.c (unify): Use fold, not maybe_fold_nontype_arg.
* pt.c (unify): Use fold, not maybe_fold_nontype_arg.
--------------------------------------------------------------------

From-SVN: r31640
2000-01-26 21:01:36 -05:00
Zack Weinberg
1e14a542ea Correct warning string to grep for
From-SVN: r31639
2000-01-27 01:14:53 +00:00
Tom Tromey
355dff4cef method.h (JvNumMethods): Moved from Class.h.
* gcj/method.h (JvNumMethods): Moved from Class.h.
	(JvGetFirstMethod): Likewise.
	* java/lang/Class.h (Object): Updated decl of
	_Jv_JNI_ToReflectedField.
	(Object): Added _Jv_JNI_ToReflectedMethod as a friend.
	* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/reflect/Field.h): Added `jboolean'
	argument of _Jv_JNI_ToReflectedField.
	(java/lang/reflect/Constructor.h): Added _Jv_JNI_ToReflectedMethod
	as a friend.
	(java/lang/reflect/Method.h): Likewise.
	* include/jni.h (class _Jv_JNIEnv): Added `klass' member.  Use
	__GCJ_JNI_IMPL__.
	(jweak): New typedef.
	(struct JNINativeInterface): Correctly declare remaining entries.
	* jni.cc: Include Class.h, ClassLoader.h.
	(_Jv_JNI_FindClass): New function.
	(_Jv_JNI_DefineClass): New function.
	(_Jv_JNI_conversion_call): New function.
	(_Jv_JNI_FindClass): Use current class loader to find class.
	(_Jv_JNI_ExceptionCheck): New function.
	(_Jv_JNI_FromReflectedField): Now static.
	(MethodClass): New define.
	(_Jv_JNI_FromReflectedMethod): New function.
	(_Jv_JNI_ToReflectedMethod): Likewise.
	Include Method.h.
	(_Jv_JNI_IsAssignableFrom): Renamed.
	(_Jv_JNI_GetStringRegion): New function.
	Include StringIndexOutOfBoundsException.h.
	(_Jv_JNI_GetStringUTFRegion): New function.
	(_Jv_JNIFunctions): Updated for new functions.
	(_Jv_JNI_GetPrimitiveArrayCritical): New function
	(_Jv_JNI_ReleasePrimitiveArrayCritical): Likewise.
	(_Jv_JNI_GetStringCritical): New function.
	(_Jv_JNI_ReleaseStringCritical): Likewise.
	(get_throwable): Removed.
	(GCJ_JV_JNIENV_FRIEND): Removed.
	(__GCJ_JNI_IMPL__): Define.
	Include method.h.

From-SVN: r31638
2000-01-26 23:56:36 +00:00
Tom Tromey
673fdf6d77 resolve.cc (get_ffi_type_from_signature): Handle case where boolean is an int.
* resolve.cc (get_ffi_type_from_signature): Handle case where
	boolean is an int.

From-SVN: r31637
2000-01-26 23:44:40 +00:00
Joern Rennecke
fa76d9e04e calls.c (special_function_p): New argument fork_or_exec.
* calls.c (special_function_p): New argument fork_or_exec.
	(expand_call): When profile_arc_flag is set and the function
	is in the fork_or_exec group, call __bb_fork_func first.
	* libgcc2.c, _bb module (__bb_fork_func): New function.
	(__bb_exit_func): If fcntl F_SETLKW is available, use it to lock
	output file.
	* config/svr4.h (TARGET_HAS_F_SETLKW): Define.
	* tree.h (special_function_p): Update prototype.

From-SVN: r31636
2000-01-26 23:38:20 +00:00
J"orn Rennecke
e09d24ffb1 calls.c (special_function_p): New argument fork_or_exec.
gcc:
	* calls.c (special_function_p): New argument fork_or_exec.
	(expand_call): When profile_arc_flag is set and the function
	is in the fork_or_exec group, call __bb_fork_func first.
	* libgcc2.c, _bb module (__bb_fork_func): New function.
	(__bb_exit_func): If fcntl F_SETLKW is available, use it to lock
	output file.
	* config/svr4.h (TARGET_HAS_F_SETLKW): Define.
	* tree.h (special_function_p): Update prototype.

gcc/cp:
	* cp/optimize.c (calls_setjmp_r): Supply new argument
	to special_function_p.

From-SVN: r31635
2000-01-26 22:27:31 +00:00
Richard Henderson
628d74de0e alpha.c (alpha_split_tfmode_pair): New.
* alpha.c (alpha_split_tfmode_pair): New.
        * alpha-protos.h: Declare it.
        * alpha.md (abstf2, negtf2): New.
        (movtf insn): Add input G constraint.
        (movtf splitter): Use alpha_split_tfmode_pair.

From-SVN: r31634
2000-01-26 14:08:59 -08:00
Kaveh R. Ghazi
c96a8082c9 * i386/cygwin.h: PROTO -> PARAMS.
From-SVN: r31633
2000-01-26 21:22:58 +00:00
Kaveh R. Ghazi
158991b7e5 call.c: PROTO -> PARAMS.
* call.c: PROTO -> PARAMS.
        * class.c: Likewise.
        * cp-tree.h: Likewise.
        * cvt.c: Likewise.
        * decl.c: Likewise.
        * decl.h: Likewise.
        * decl2.c: Likewise.
        * dump.c: Likewise.
        * errfn.c: Likewise.
        * error.c: Likewise.
        * except.c: Likewise.
        * expr.c: Likewise.
        * init.c: Likewise.
        * input.c: Likewise.
        * lex.c: Likewise.
        * lex.h: Likewise.
        * method.c: Likewise.
        * optimize.c: Likewise.
        * parse.y: Likewise.
        * pt.c: Likewise.
        * repo.c: Likewise.
        * rtti.c: Likewise.
        * search.c: Likewise.
        * semantics.c: Likewise.
        * spew.c: Likewise.
        * tree.c: Likewise.
        * typeck.c: Likewise.
        * typeck2.c: Likewise.
        * xref.c: Likewise.

From-SVN: r31632
2000-01-26 20:51:37 +00:00
Jakub Jelinek
5c5c34a4cb sparc.c (sparc_emit_float_lib_cmp): Handle TARGET_ARCH32 again.
* config/sparc/sparc.c (sparc_emit_float_lib_cmp): Handle
	TARGET_ARCH32 again. Handle ORDERED, UN* and LTGT comparisons
	using _Qp_cmp/_Q_cmp and testing the return value.
	(print_operand): Call reverse_condition_maybe_unordered if
	we are handling CCFPmode or CCFPEmode.
	Handle ORDERED, UN* and LTGT comparisons.
	* config/sparc/sparc.md (cmptf): Use even on TARGET_ARCH32
	if not TARGET_HARD_QUAD.
	(seq, sne, sgt, slt, sge, sle, beq, bne, bgt, blt, bge, ble,
	bunordered, bordered, bungt, bunlt, buneq, bunge, bunle, bltgt):
	Call sparc_emit_float_lib_cmp even on TARGET_ARCH32.
	Adjust gen_b* calls so that they reflect return comparison of
	sparc_emit_float_lib_cmp.

From-SVN: r31631
2000-01-26 21:14:10 +01:00
Jeff Law
ec8b18a48b Daily bump.
From-SVN: r31630
2000-01-26 01:45:06 -07:00
Alexandre Oliva
c77f46c67e alpha.c (alpha_emit_xfloating_cvt): Do not assume incoming operands array is large enough for one more operand.
* config/alpha/alpha.c (alpha_emit_xfloating_cvt): Do not assume
incoming operands array is large enough for one more operand.
(alpha_emit_xfloating_arith): Likewise.

From-SVN: r31629
2000-01-26 07:57:28 +00:00
Zack Weinberg
cef40e9fa4 Makefile.in (machname.h): SunOS 4 sed can't handle a file with one line and no trailing newline.
* fixinc/Makefile.in (machname.h): SunOS 4 sed can't handle a
	file with one line and no trailing newline.
	Patch by Kaveh Ghazi <ghazi@caip.rutgers.edu>.
	* fixinc/fixtests.c (machine_name_test): Fix fencepost error
	checking if the match is on the line.
	* fixinc/gnu-regex.c: Provide regerror not __regerror.

From-SVN: r31628
2000-01-26 07:37:30 +00:00
Alexandre Oliva
3f50679d00 * gcc.dg/unused-2.c: New test.
From-SVN: r31627
2000-01-26 07:15:01 +00:00
Alexandre Oliva
3ebed0b2f8 * gcc.dg/conv-1.c: New test.
From-SVN: r31626
2000-01-26 07:14:06 +00:00
Richard Henderson
5850dc005d sparc.c (output_cbranch): Fix accidental squashing of the fp branch pre-delay nop.
* sparc.c (output_cbranch): Fix accidental squashing of the
        fp branch pre-delay nop.

From-SVN: r31625
2000-01-25 19:13:13 -08:00
Richard Henderson
7913f3d028 tree.def (UNNE_EXPR): Remove.
* tree.def (UNNE_EXPR): Remove.
        * c-typeck.c (build_binary_op): Don't handle it.
        * expr.c (expand_expr, do_jump, do_store_flag): Likewise.
        * cp/typeck.c (build_binary_op_nodefault): Likewise.

        * rtl.def (UNNE): Remove.
        (LTGT): Add.
        * jump.c (reverse_condition): Update accordingly.
        (swap_condition): Likewise.
        (comparison_dominates_p): Handle unordered comparisons.
        (reverse_condition_maybe_unordered): New.
        * rtl.h (reverse_condition_maybe_unordered): Declare.

        * sparc.c (select_cc_mode): Update for UNNE/LTGT.
        (output_cbranch): Use reverse_condition_maybe_unordered and LTGT.
        * sparc.h (REVERSIBLE_CC_MODE): Always true.  Update docs.
        * sparc.md (bltgt): New.

From-SVN: r31624
2000-01-25 18:06:21 -08:00
Nick Clifton
78340c9f9f Only check machine class insns for improper emission of a RETURN
From-SVN: r31623
2000-01-26 01:23:26 +00:00
Tom Tromey
8de7c9a0eb interpret.cc (run): Don't call println.
* interpret.cc (run): Don't call println.
	Don't include PrintStream.h.

From-SVN: r31622
2000-01-26 00:56:36 +00:00
Tom Tromey
0507a9b19f field.h (struct _Jv_Field): Use "jshort" as type for nameIndex.
* gcj/field.h (struct _Jv_Field): Use "jshort" as type for
	nameIndex.  Use "jint" as type for boffset.
	* java/lang/Class.h (struct _Jv_Method): Made accflags a
	_Jv_ushort.
	(Class): Likewise.  Also changed type of method_count,
	vtable_method_count, size_in_bytes, field_count,
	static_field_count, interface_count.
	* gcj/array.h (__JArray): Made `length' a const jsize, not an
	int.

From-SVN: r31621
2000-01-26 00:55:50 +00:00
Richard Henderson
7554ad67e5 Makefile.in (flow.o): Depend on $(EXPR_H).
* Makefile.in (flow.o): Depend on $(EXPR_H).
        * flow.c (mark_regs_live_at_end): Use hard_function_value, i.e.
        duplicate the structure of diddle_return_value for keeping regs live.

From-SVN: r31620
2000-01-25 16:54:44 -08:00
Mark Mitchell
1a588ad752 cp-tree.h (vcall_offset_in_vtable_p): New macro.
* cp-tree.h (vcall_offset_in_vtable_p): New macro.
	* class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
	(struct vcall_offset_data_s): New type.
	(dfs_vcall_offset_queue_p): New function.
	(dfs_build_vcall_offset_vtbl_entries): Likewise.
	(build_vcall_offset_vtbl_entries): Likewise.
	(layout_vtable_decl): Likewise.
	(num_vfun_entries): Likewise.
	(num_extra_vtbl_entries): Add the entries for vcall offsets.
	(build_vtbl_initializer): Likewise.
	(dfs_finish_vtabls): Use layout_vtable_decl.
	(modify_one_vtables): Always duplicate vtables under the new ABI.
	(finish_struct_1): Use layout_vtable_decl.

From-SVN: r31619
2000-01-25 23:26:21 +00:00
Michael Hayes
0534b8047e loop.c (current_loop_info): Delete.
2000-01-26  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>

	* loop.c (current_loop_info): Delete.
	(consec_sets_invariant_p): Add loop argument, update callers.
	(get_condition_for_loop): Likewise.
	(count_nonfixed_reads, update_giv_derive): Likewise.
	(simplify_giv_expr, general_induction_var): Likewise.
	(consec_sets_giv, recombine_givs): Likewise.
	(move_movables): Delete loop_start and loop_end arguments,
	add loop argument, and update callers.
	(find_mem_givs, check_final_value): Likewise.
	(record_giv, maybe_eliminate_biv, maybe_eliminate_biv_1): Likewise.
	(loop_invariant_p): Rename from invariant_p, add loop argument, and
	update callers.
	(basic_induction_var): Add loop argument, delete loop_level argument,
	and update callers.
	* unroll.c (iteration_info): Delete loop_start and loop_end arguments,
	add loop argument, and update callers.
	(find_splittable_regs, find_splittable_givs): Likewise.
	(reg_dead_after_loop, loop_find_equiv_value): Likewise.
	(final_biv_value, final_giv_value, back_branch_in_range_p): Likewise.
	(biv_total_increment): Delete loop_start and loop_end arguments;
	update callers.
	(precondition_loop_p): Delete loop_start and loop_info arguments;
	update callers.
	* loop.h (get_condition_for_loop): Add loop argument.
	(biv_total_increment): Delete loop_start and loop_end arguments.
	(precondition_loop_p): Delete loop_start and loop_info arguments;
	add loop argument.
	(final_biv_value): Delete loop_start and loop_end arguments;
	add loop argument.
	(final_giv_value, back_branch_in_range_p): Likewise.

From-SVN: r31618
2000-01-25 22:49:56 +00:00
Gavin Romig-Koch
8e46653128 * config/mips/mips.h (LEGITIMATE_CONSTANT_P): Fix for mips16.
From-SVN: r31617
2000-01-25 22:18:59 +00:00