objc-act.c (adjust_type_for_id_default): Fix my previous patch.
2002-07-09 Devang Patel <dpatel@apple.com>
* objc/objc-act.c (adjust_type_for_id_default): Fix my previous patch.
Do not allow ObjC objects as a parameter type for Objective-C methods.
My previous patch restricted 'struct' also.
Neil Booth [Tue, 9 Jul 2002 22:21:37 +0000 (22:21 +0000)]
cpperror.c (cpp_error): Default to directive_line within directives here.
* cpperror.c (cpp_error): Default to directive_line within
directives here.
* cppexp.c (cpp_interpret_integer): Only use traditional
number semantics in directives.
* cpplib.c (prepare_directive_trad): Don't reset pfile->line.
(do_include_common): Similarly.
* cpptrad.c (scan_out_logical_line): Implement accurate
quoting of <> in #include.
* doc/cpp.texi: Update.
Steve Ellcey [Mon, 8 Jul 2002 17:53:24 +0000 (17:53 +0000)]
c-pragma.h (add_to_renaming_pragma_list): New function.
* gcc/c-pragma.h (add_to_renaming_pragma_list): New function.
* gcc/c-pragma.c (add_to_renaming_pragma_list): New function.
(handle_pragma_redefine_extname): Change to use new function.
* config/mips/mips.md: Add imadd type. Update scheduler description
to use imadd as well as imul.
(*mul_acc_si, *madsi): Change imul alternatives to imadd.
(*mul_acc_di, *mul_acc_64bit_di): Likewise.
(*mul_sub_si): Likewise for first alternative. Change second
alternative from imul to multi.
Mark Mitchell [Mon, 8 Jul 2002 02:25:19 +0000 (02:25 +0000)]
Make-lang.in (cp/parse.o): Depend on decl.h.
* Make-lang.in (cp/parse.o): Depend on decl.h.
* cp-tree.h (do_decl_instantiation): Change prototype.
* parse.y: Include decl.h.
(parse_decl_instantiation): New function.
(explicit_instantiation): Use it.
* pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
and DECLSPECS.
Neil Booth [Sun, 7 Jul 2002 22:10:18 +0000 (22:10 +0000)]
c-common.c (c_common_post_options): Update prototype; don't init backends if preprocessing only.
* c-common.c (c_common_post_options): Update prototype;
don't init backends if preprocessing only.
* langhooks-def.h (LANG_HOOKS_POST_OPTIONS): Update.
* langhooks.h (struct lang_hooks): Update post_options to
return a boolean.
* toplev.c (parse_options_and_default_flags, do_compile,
lang_independent_init): Update prototypes. Allow the
front end to specify that there is no need to initialize
the back end.
(general_init): Move call to hex_init here...
(toplev_main): ...from here. Pass flag for back end init
suppression.
java:
* lang.c (java_post_options): Update prototype.
* config/mmix/mmix.md ("call"): Use mmix_get_hard_reg_initial_val,
not unprototyped get_hard_reg_initial_val.
("call_value", "nonlocal_goto_receiver"): Ditto.
("return"): Make define_expand. Move real insn to...
("*expanded_return"): New pattern.
("prologue", "epilogue"): New define_expands.
* config/mmix/mmix.h (MMIX_rO_REGNUM): New macro.
(struct machine_function): New member in_prologue.
(FIRST_PSEUDO_REGISTER): Adjust for including rO as register.
(FIXED_REGISTERS, CALL_USED_REGISTERS): Ditto.
(MMIX_MMIXWARE_ABI_REG_ALLOC_ORDER): Ditto.
(MMIX_GNU_ABI_REG_ALLOC_ORDER, REG_CLASS_CONTENTS): Ditto.
(REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES): Ditto.
(LOCAL_REGNO): Define. Adjust comment.
* config/mmix/mmix.c (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS):
Consider regs_ever_live[MMIX_rJ_REGNUM], not just
leaf_function_p.
(MMIX_OUTPUT_REGNO): Don't translate registers while outputting
the prologue.
(mmix_target_asm_function_prologue): Make static. Just mark that
the prologue is being emitted. Move guts to...
(mmix_expand_prologue): New function. Adjust for emitting
prologue as rtl. For sizes, use HOST_WIDE_INT only.
(mmix_target_asm_function_epilogue): Make static. Simply emit a
\n. Move guts to...
(mmix_expand_epilogue): New function. Adjust for emitting
epilogue as rtl. For sizes, use HOST_WIDE_INT only.
(mmix_target_asm_function_end_prologue): Mark that the prologue
has ended.
(TARGET_ASM_FUNCTION_END_PROLOGUE): Define.
(mmix_conditional_register_usage): Improve comments.
(mmix_local_regno): New function.
(mmix_emit_sp_add, mmix_get_hard_reg_initial_val): Ditto.
* config/mmix/mmix-protos.h (mmix_local_regno): Prototype.
(mmix_expand_prologue, mmix_expand_epilogue): Ditto.
(mmix_get_hard_reg_initial_val): Ditto.
Paolo Carlini [Sun, 7 Jul 2002 10:15:06 +0000 (12:15 +0200)]
re PR libstdc++/7186 (DR179 for std::deque::iterator and const_iterator)
2002-07-07 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/7186
* include/bits/stl_deque.h (_Deque_iterator::operator-):
Make non-member, as already happens for the comparison
operators in accord with DR179 (Ready).
* testsuite/23_containers/deque_operators.cc: Add test02.
Roger Sayle [Sat, 6 Jul 2002 00:16:44 +0000 (00:16 +0000)]
re PR c++/7099 (G++ doesn't set the noreturn attribute on std::exit and std::abort)
PR c++/7099
* builtin-attrs.def: Define new attribute lists for use in
builtins.def.
* builtins.def [DEF_BUILTIN]: Modify to take an additional
ATTRS argument, an enumerated value defined in builtin-attrs.def
that represents the attribute list for the builtins. Modify
all builtin functions to pass an appropriate attribute list.
Specify "abort", "exit", "_exit" and "_Exit" builtins here with
their required noreturn attributes.
* tree.h (enum_builtin_function): Ignore the additional parameter
to DEF_BUILTIN.
* builtins.c (built_in_names): Likewise.
* c-common.c: (builtin_function_2): Replace the "int noreturn_p"
argument with a tree representing the functions attribute list.
Pass this "attrs" argument to builtin_function. No longer handle
the noreturn_p processing manually.
(built_in_attributes): Move the definitions from builtin-attrs.def
before c_common_nodes_and_builtins.
(c_common_nodes_and_builtins): Handle the new ATTRS parameter in
DEF_BUILTIN, passing it to both builtin_function and the changed
builtin_function_2.
* doc/extend.texi: Document __builtin_abort, __builtin_exit,
__builtin__exit and __builtin__Exit.
* java/builtins.c (initialize_builtins): Ignore the additional
parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
the builtins.def file.
m68hc11.md ("*movqi_68hc12"): Avoid allocating QI mode registers in soft registers.
* config/m68hc11/m68hc11.md ("*movqi_68hc12"): Avoid allocating
QI mode registers in soft registers.
("zero_extendqihi2"): Do not take into account soft registers
for register allocation (use '*' constraint).
Tom Tromey [Fri, 5 Jul 2002 20:40:11 +0000 (20:40 +0000)]
re PR libgcj/7060 (getMethod() doesn't search super interface)
2002-07-04 Tom Tromey <tromey@redhat.com>
Jeff Sturm <jsturm@one-point.com>
Fix for PR libgcj/7060:
* java/lang/Class.h (_getMethod): Renamed from getMethod.
* java/lang/natClass.cc (_getMethod): Renamed from getMethod.
Recurse into superinterfaces. Don't throw NoSuchMethodException.
* java/lang/Class.java (getMethod): New Java implementation;
complies with spec.
(_getMethod): New native method.
Co-Authored-By: Jeff Sturm <jsturm@one-point.com>
From-SVN: r55266
* configure.in: Correct typos: gcc_cv_as_gdwarf2_debug_flag to
gcc_cv_as_gdwarf2_flag and gcc_cv_as_gstabs_debug_flag
to gcc_cv_as_gstabs_flag.
* configure: Rebuilt.
simplify-rtx.c (simplify_subreg): Reduce problem of finding vector mode subregs of constants to finding integer...
gcc:
* simplify-rtx.c (simplify_subreg): Reduce problem of finding
vector mode subregs of constants to finding integer mode
subregs of constants.
* cse.c (cse_insn): Use simplify_gen_subreg.
* convert.c (convert_to_integer): Don't strip a NOP_EXPR
From a vector mode expression of different size than the
target mode.
gcc/testsuite:
* gcc.c-torture/compile/simd-3.c: New test.
Jack Reeves [Wed, 3 Jul 2002 22:25:06 +0000 (22:25 +0000)]
re PR libstdc++/3946 (auto_ptr_ref constructor allows dangerous conversion)
2002-07-03 Jack Reeves <jackw_reeves@hotmail.com>
Kenny Simpson <theonetruekenny@yahoo.com>
Phil Edwards <pme@gcc.gnu.org>
PR libstdc++/3946
* testsuite/20_util/auto_ptr.cc (test08): New test.
* include/std/std_memory.h (auto_ref_ptr): Make constructor explicit.
(auto_ptr::operator auto_ptr_ref): Fix typo.
General reformatting and doxygenating of the whole file.
Co-Authored-By: Kenny Simpson <theonetruekenny@yahoo.com> Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>
From-SVN: r55223
Roger Sayle [Wed, 3 Jul 2002 21:00:23 +0000 (21:00 +0000)]
combine.c (struct_undo): Change types of recorded substitutions to be either "int" or "rtx"...
* combine.c (struct_undo): Change types of recorded substitutions
to be either "int" or "rtx", instead of "unsigned int" and "rtx".
(do_SUBST_INT): Change types of the substitution from unsigned int
to int, to avoid compilation warning from SUBST_INT's only caller.
(make_extraction): Add cast to avoid compilation warning.
(force_to_mode): Remove cast to avoid compilation warning.
re PR c++/6944 (missing feature on default copy-constructor for class with multi-dim arrays)
PR c++/6944
* init.c (build_aggr_init): Remove qualifiers of init before calling
build_vec_init.
(build_vec_init): Flatten multi-dimensional array during cleanup.
(build_vec_delete_1): Abort if the type of each element is array.
* g++.dg/init/array4.C: New test.
* g++.dg/init/array5.C: New test.
optabs.c (expand_vector_binop): Don't store using a SUBREG smaller than UNITS_PER_WORD...
gcc:
* optabs.c (expand_vector_binop): Don't store using a SUBREG smaller
than UNITS_PER_WORD, unless this is little endian and the first unit
in this word. Let extract_bit_field decide how to load an element.
Force arguments to matching mode.
(expand_vector_unop): Likewise.
* simplify-rtx.c (simplify_subreg): Don't assume that all vectors
consist of word_mode elements.
* c-typeck.c (build_binary_op): Allow vector types for BIT_AND_EXPR,
BIT_ANDTC_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
(build_unary_op): Allow vector types for BIT_NOT_EPR.
* emit-rtl.c (gen_lowpart_common): Use simplify_gen_subreg for
CONST_VECTOR.
* optabs.c (expand_vector_binop): Try to perform operation in
smaller vector modes with same inner size. Add handling of AND, IOR
and XOR. Reject expansion to inner-mode sized scalars when using
OPTAB_DIRECT. Use simplify_gen_subreg on constants.
(expand_vector_unop): Try to perform operation in smaller vector
modes with same inner size. Add handling of one's complement.
When there is no vector negate operation, try a vector subtract
operation. Use simplify_gen_subreg on constants.
* simplify-rtx.c (simplify_subreg): Add capability to convert vector
constants into smaller vectors with same inner mode, and to
integer CONST_DOUBLEs.
gcc/testsuite:
* gcc.c-torture/execute/simd-1.c (main): Also test &, |, ^, ~.
* gcc.c-torture/execute/simd-2.c (main): Likewise.
Benjamin Kosnik [Wed, 3 Jul 2002 06:29:26 +0000 (06:29 +0000)]
re PR libstdc++/6410 (Trouble with non-Ascii monetary symbols and wchar_t)
2002-07-02 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/6410
* include/bits/locale_facets.h (moneypunct::moneypunct): Add const
char* name parameter.
* config/locale/gnu/monetary_members.cc: Use it.
* config/locale/generic/monetary_members.cc: Same.
* src/localename.cc (_Impl::_Impl(const char*, size_t)): Use it.
objc-act.c (adjust_type_for_id_default): Do not allow an object as parameter.
* objc/objc-act.c (adjust_type_for_id_default): Do not allow an
object as parameter. Prevent something like 'NSObject' to be
used as the type for a method argument.
* sh.c (print_operand, case 'N'): Allow zero vector.
(arith_reg_or_0_operand): Likewise.
(zero_vec_operand): Check for CONST_VECTOR, not PARALLEL.
* sh.h (CONST_COSTS): 0 has 0 cost. Check OUTER_CODE for
IOR, XOR, PLUS and SET and take their respective constant
ranges into account.
(PREDICATE_CODES, arith_reg_or_0_operand): Can be CONST_VECTOR.
* sh.md (subdi3, subdi3_media): Allow zero operand.
(movv8qi_i+3): Only vector that is not split is the zero vector.
Fix operand 3 to simplify_subreg.
(movv2si_i): Split alternative 1.
(mshfhi_l_di_rev+1): New splitter.
! if (GET_CODE (v) != PARALLEL
|| (GET_MODE (v) != mode && mode != VOIDmode))
return 0;
for (i = XVECLEN (v, 0) - 1; i >= 0; i--)
--- 6223,6229 ----
{
int i;
! if (GET_CODE (v) != CONST_VECTOR
|| (GET_MODE (v) != mode && mode != VOIDmode))
return 0;
for (i = XVECLEN (v, 0) - 1; i >= 0; i--)
Index: config/sh/sh.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.h,v
retrieving revision 1.154
diff -p -r1.154 sh.h
*** config/sh/sh.h 1 Jul 2002 19:41:53 -0000 1.154
--- config/sh/sh.h 2 Jul 2002 17:45:37 -0000
*************** while (0)
*** 2689,2698 ****
case CONST_INT: \
if (TARGET_SHMEDIA) \
{ \
if ((OUTER_CODE) == AND && and_operand ((RTX), DImode)) \
return 0; \
if (CONST_OK_FOR_J (INTVAL (RTX))) \
! return COSTS_N_INSNS (1); \
else if (CONST_OK_FOR_J (INTVAL (RTX) >> 16)) \
return COSTS_N_INSNS (2); \
else if (CONST_OK_FOR_J ((INTVAL (RTX) >> 16) >> 16)) \
--- 2689,2704 ----
case CONST_INT: \
if (TARGET_SHMEDIA) \
{ \
+ if (INTVAL (RTX) == 0) \
+ return 0; \
if ((OUTER_CODE) == AND && and_operand ((RTX), DImode)) \
return 0; \
+ if (((OUTER_CODE) == IOR || (OUTER_CODE) == XOR \
+ || (OUTER_CODE) == PLUS) \
+ && CONST_OK_FOR_P (INTVAL (RTX))) \
+ return 0; \
if (CONST_OK_FOR_J (INTVAL (RTX))) \
! return COSTS_N_INSNS ((OUTER_CODE) != SET); \
else if (CONST_OK_FOR_J (INTVAL (RTX) >> 16)) \
return COSTS_N_INSNS (2); \
else if (CONST_OK_FOR_J ((INTVAL (RTX) >> 16) >> 16)) \
*************** extern int rtx_equal_function_value_matt
*** 3225,3231 ****
{"arith_operand", {SUBREG, REG, CONST_INT}}, \
{"arith_reg_dest", {SUBREG, REG}}, \
{"arith_reg_operand", {SUBREG, REG}}, \
! {"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \
{"binary_float_operator", {PLUS, MULT}}, \
{"commutative_float_operator", {PLUS, MULT}}, \
{"extend_reg_operand", {SUBREG, REG, TRUNCATE}}, \
--- 3231,3237 ----
{"arith_operand", {SUBREG, REG, CONST_INT}}, \
{"arith_reg_dest", {SUBREG, REG}}, \
{"arith_reg_operand", {SUBREG, REG}}, \
! {"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_VECTOR}}, \
{"binary_float_operator", {PLUS, MULT}}, \
{"commutative_float_operator", {PLUS, MULT}}, \
{"extend_reg_operand", {SUBREG, REG, TRUNCATE}}, \
Index: config/sh/sh.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.md,v
retrieving revision 1.107
diff -p -r1.107 sh.md
*** config/sh/sh.md 1 Jul 2002 19:41:54 -0000 1.107
--- config/sh/sh.md 2 Jul 2002 17:45:38 -0000
***************
*** 546,552 ****
;; There is no way to model this with gcc's function units. This problem is
;; actually mentioned in md.texi. Tackling this problem requires first that
;; it is possible to speak about the target in an open discussion.
! ;;
;; However, simple double-precision operations always conflict.
(define_function_unit "fp" 1 0
--- 546,552 ----
;; There is no way to model this with gcc's function units. This problem is
;; actually mentioned in md.texi. Tackling this problem requires first that
;; it is possible to speak about the target in an open discussion.
! ;;
;; However, simple double-precision operations always conflict.
Paolo Carlini [Tue, 2 Jul 2002 18:42:58 +0000 (20:42 +0200)]
re PR libstdc++/6642 (Constness prevents substraction of iterators)
2002-07-02 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/6642
* include/bits/stl_iterator.h
(__normal_iterator::operator-(const __normal_iterator&)):
Make non-member, as already happens for the comparison
operators in accord with DR179 (Ready).
* testsuite/24_iterators/iterator.cc: Add test from the PR.
Neil Booth [Tue, 2 Jul 2002 17:06:03 +0000 (17:06 +0000)]
cppinit.c (cpp_handle_option): Suppress warnings with an implicit "-w" for "-M" and "-MM".
* cppinit.c (cpp_handle_option): Suppress warnings with an
implicit "-w" for "-M" and "-MM".
doc:
* cppopts.texi: Update.
testsuite:
* gcc.dg/cpp/cmdlne-M.c: New test.
re PR c++/6716 (loop and fill ram during compiling)
PR c++/6716
* pt.c (can_complete_type_without_circularity): New function.
(instantiate_class_template): Use it.
* typeck2.c (incomplete_type_error): Improve error message
due to incomplete fields.