2004-10-26 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/array_allocator.h (array::allocate): Check for valid
array object, use its size member function directly.
* testsuite/ext/array_allocator/3.cc: New.
* docs/html/20_util/allocator.html: Add docs.
From-SVN: r89573
2004-10-25 Geoffrey Keating <geoffk@apple.com>
* config/darwin.h (LINK_SPEC): Default weak_reference_mismatches
to 'non-weak'.
(MAKE_DECL_ONE_ONLY): Set DECL_WEAK.
(ASM_MAKE_LABEL_LINKONCE): Delete.
(ASM_WEAKEN_DECL): New.
(ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY.
(ASM_DECLARE_FUNCTION_NAME): Likewise.
(TEXT_SECTION_ASM_OP): Add a tab.
(DATA_SECTION_ASM_OP): Likewise.
(SECTION_FUNCTION): Add a tab. Use fputs. Don't call
data_section on every section change.
(EXTRA_SECTIONS): Add a bunch of new extra sections.
(EXTRA_SECTION_FUNCTIONS): Likewise.
(USE_SELECT_SECTION_FOR_FUNCTIONS): Define.
(JCR_SECTION_NAME): Define.
(TARGET_SECTION_TYPE_FLAGS): Don't define.
* config/darwin.c (darwin_encode_section_info): A symbol is defined
in this file if it is not weak.
(textcoal_section): Delete.
(datacoal_section): Delete.
(darwin_make_decl_one_only): Delete.
(machopic_select_section): Handle functions.
(darwin_asm_named_section): Add a tab.
(darwin_section_type_flags): Delete.
(darwin_unique_section): Delete contents.
(darwin_emit_unwind_label): Add a tab. Make decls weak if
DECL_WEAK is set.
* config/darwin-protos.h (darwin_section_type_flags): Delete.
(darwin_make_decl_one_only): Delete.
(text_coal_section): New.
(text_unlikely_section): New.
(text_unlikely_coal_section): New.
(const_coal_section): New.
(data_coal_section): New.
(const_data_coal_section): New.
* varasm.c (function_section): Honour
USE_SELECT_SECTION_FOR_FUNCTIONS.
* dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when
TARGET_USES_WEAK_UNWIND_INFO is in effect.
* dbxout.c (dbxout_source_file): Don't change sections while
a function is being output.
Index: gcc/testsuite/ChangeLog
2004-10-25 Geoffrey Keating <geoffk@apple.com>
* objc.dg/image-info.m: Update for changes to section selection.
Index: libjava/ChangeLog
2004-10-25 Geoffrey Keating <geoffk@apple.com>
* Makefile.am (DARWIN_CRT_SRC): New.
(libgcj_la_SOURCES): Use it.
* configure.ac: Define USING_DARWIN_CRT when on Darwin.
* darwin.cc: New file.
* include/jvm.h (_Jv_RegisterClasses): Constify.
(_Jv_RegisterClasses_Counted): New prototype.
* java/lang/Class.h: Include stddef.h.
(_Jv_RegisterClasses): Constify.
(_Jv_RegisterClasses_Counted): New prototype.
(Object): Make '_Jv_RegisterClasses_Counted' a friend.
* java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify.
(_Jv_RegisterClasses_Counted): New function.
* configure: Regenerate.
* Makefile.in: Regenerate.
* gcj/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
Index: libstdc++-v3/ChangeLog
2004-10-25 Geoffrey Keating <geoffk@apple.com>
* libsupc++/new_op.cc (new): Make weak.
* libsupc++/new_opnt.cc (new): Make weak.
* libsupc++/new_opv.cc (new): Make weak.
* libsupc++/new_opvnt.cc (new): Make weak.
* libsupc++/delete_op.cc (delete): Make weak.
* libsupc++/delete_opnt.cc (delete): Make weak.
* libsupc++/delete_opv.cc (delete): Make weak.
* libsupc++/delete_opvnt.cc (delete): Make weak.
From-SVN: r89572
[gcc/ChangeLog]
2004-10-25 David Ayers <d.ayers@inode.at>
* c-common.h: Remove RID_ID.
* c-parse.in: Remove OBJECTNAME and references to RID_ID.
(typespec_reserved_attr): Add rule for TYPENAME
non_empty_protocolrefs.
(yylexname): Remove special handling of RID_ID.
[gcc/objc/ChangeLog]
2004-10-25 Ziemowit Laski <zlaski@apple.com>
David Ayers <d.ayers@inode.at>
* objc-act.c (objc_comptypes): Use IS_PROTOCOL_QUALIFIED_UNTYPED
instead of IS_PROTOCOL_QUALIFIED_ID; add comparisons for:
'Class <Protocol> != id <Protocol>'; 'Class <Protocol> != <class> *';
'Class <Protocol> == id' and 'Class <Protocol> == Class'.
(objc_is_id): Add test for 'super'.
(objc_finish_message_expr): Allow for messaging of 'Class <Proto>'
receivers; if class methods are not found in protocol lists, search
for instance methods therein and warn if one is found. Look in
global hash tables for suitable method as a last resort when messaging
'id <Proto>', 'Class <Proto>' and invalid receiver types.
(objc_add_method): Insert instance methods listed in protocols into
the global class method hash table.
* objc-act.h (IS_PROTOCOL_QUALIFIED_ID): Rename to
IS_PROTOCOL_QUALIFIED_UNTYPED and allow for 'Class <Proto>' in
addition to 'id <Proto>'.
[gcc/testsuite/ChangeLog]
2004-10-25 David Ayers <d.ayers@inode.at>
Ziemowit Laski <zlaski@apple.com>
* objc.dg/call-super-2.m: Add messages to 'Class <Proto>'; update
diagnostics when messaging 'id <Proto>'.
* objc.dg/class-protocol-1.m: New test.
* objc.dg/desig-init-1.m: Add message to an invalid receiver using
a non-existent method signature.
* objc.dg/method-5.m, objc.dg/method-6.m, objc.dg/proto-hier-1.m:
Update diagnostics when messaging with non-existent method signature.
* objc.dg/proto-hier-2.m: Adjust wording of diagnostic.
* objc.dg/proto-lossage-1.m, objc.dg/proto-lossage-4.m: Messages to
invalid receivers are now resolved as if messaging 'id'; remove
extraneous diagnostics.
From-SVN: r89562
PR c/16667
* c-parse.in (array_designator): New.
(designator): Use it.
(initelt): Only permit array_designator without '=', not ".foo".
testsuite:
* gcc.dg/init-desig-obs-1.c, gcc.dg/init-desig-obs-2.c,
gcc.dg/init-desig-obs-3.c: New tests.
From-SVN: r89560
* cfgloopmanip.c (loopify): Take two more arguments true_edge
and false_edge.
* cfgloop.h: Adjust the corresponding prototype.
* loop-unswitch.c (unswitch_loop): Adjust a call to loopify.
* tree-ssa-loop-manip.c (tree_ssa_loop_version): Likewise.
From-SVN: r89555
* cse.c: Change encoding of quantity numbers to avoid undefined
pointer arithmetic on qty_table.
(REGNO_QTY_VALID_P): A quantity is now valid if it isn't negative.
(get_cse_reg_info): Initialize reg_qty to a unique negative value.
(new_basic_block): Assign "real" quantity numbers from zero.
(delete_reg_equiv): Do nothing if quantity is invalid. Reset the
REG_QTY to its unique negative value.
(merge_equiv_classes): Calculate need_rehash if quantity is valid.
(cse_main): Don't include max_reg when determining max_qty.
(cse_basic_block): Avoid subtracting a large offset from qty_table,
which causes undefined C99 behaviour. Only allocate needed memory.
Co-Authored-By: John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
From-SVN: r89543
2004-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (_Rep::_M_is_safe): Move to
basic_string as _M_disjunct, adjust to take only __s.
* include/bits/basic_string.tcc: Adjust consistently callers.
From-SVN: r89534
2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/17407
* c-decl.c (grokdeclarator) <case cdk_array>: Remove the call
layout_type as it is already done by build_array_type.
* tree.c (build_array_type): Layout the type even
2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/18121
* decl.c (grokdeclarator) <case cdk_array>: Remove the call
layout_type as it is already done by create_array_type_for_decl.
2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/17407
* gcc.c-torture/compile/pr17407.c: New test.
PR c++/18121
* g++.dg/template/array8.C: New test.
From-SVN: r89533
2004-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.tcc (assign(const _CharT*, size_type)):
Adjust bit missing from the previous commit.
From-SVN: r89532
gcc/testsuite:
PR other/18138
* lib/g++.exp: Accept more than one multilib libgcc.
* lib/gcc-dg.exp: Likewise.
* lib/objc.exp: Likewise.
* lib/treelang.exp: Likewise.
* lib/gfortran.exp: Likewise.
libffi:
PR other/18138
* testsuite/lib/libffi-dg.exp: Accept more than one multilib
libgcc.
libjava:
PR other/18138
* testsuite/lib/libjava.exp: Accept more than one multilib
libgcc.
libmudflap!:
PR other/18138
* testsuite/lib/libmudflap.exp: Accept more than one multilib
libgcc.
libstdc++-v3:
PR other/18138
* testsuite/lib/libstdc++.exp: Accept more than one multilib
libgcc.
From-SVN: r89528
2004-10-24 James A. Morrison <phython@gcc.gnu.org>
* treetree.c (tree_code_generate_return): Wrap param declaration in
ENABLE_CHECKING.
From-SVN: r89520