* class.c (layout_class_type): Do not issue C++ ABI warnings
for ObjC structs.
* decl.c (objc_mark_locals_volatile): Streamline by calling
objc_volatilize_decl().
* parser.c (cp_parser_objc_message_expression): Allow simple
type specifiers (instead of merely type names) as message
receivers.
* pt.c (template_args_equal): Do not call objc_comptypes().
* typeck.c (composite_pointer_type): If both pointers are
ObjC-esque, arbitrarily choose the first; do not call
objc_comptypes().
(comptypes): Do not call objc_comptypes().
(convert_for_assignment): Call objc_compare_types().
(comp_ptr_ttypes_real): Call objc_type_quals_match() before
concluding that types do not match.
From-SVN: r100125
include/
2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
* libiberty.h (ACONCAT): Properly cast value of alloca().
* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if
__cplusplus.
libiberty/
2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
* configure.ac: Check declarations for calloc(), getenv(),
malloc(), realloc() and sbrk().
* config.in: Regenerate.
* configure: Likewise.
* alloca.c (C_alloca): Change "new" to "new_storage". Use XNEWVEC
instead of xmalloc.
* choose-temp.c (choose_temp_base): Use XNEWVEC instea od xmalloc.
* concat.c (liiberty_concat_ptr): Surround definition with an
extern "C" block, if __cplusplus.
(concat): Use XNEWVEC instead of xmalloc.
(reconcat): Likewise.
* cp-demangle.c (struct d_print_template): Rename member
"template" to "template_decl". Adjust use throughout the file.
(d_print_resize): Properly cast return value of realloc().
(cplus_demangle_print): Same for malloc().
(d_demangle): Likewise.
* cp-demint.c (cplus_demangle_fill_builtin_type): Rename parameter
"typename" to "type_name".
* cplus-dem.c (grow_vect): Use XRESIZEVEC instead of xrealloc().
(work_stuff_copy_to_from): Use XNEWVEC insteand of xmalloc().
(demangle_template_value_parm): Likewise.
(demangle_template): Likewise.
(recursively_demangle): Likewise.
(do_hpacc_template_literal): Likewise.
(do_arg): Likewise.
(remember_type): Likewise.
(remember_Ktype): Likewise.
(register_Btype): Likewise.
(string_need): Use XRESIZEVEC instead of xrealloc().
* dyn-string.c (dyn_string_init): Use XNEWVEC.
(dyn_string_new): Use XNEW.
(dyn_string_resize): Use XRESIZEVEC.
* fnmatch.c (fnmatch): Rename local variable "not" to "negate".
* getopt.c (getenv): Declare only if !__cplusplus and !getenv.
Otherwise include <stdlib.h>.
(exchange): Cast return value of malloc().
* hashtab.c (htab_size): Define as both macro and non-inline
function.
(htab_elements): Likewise.
* getpwd.c (getpwd): Use XNEWVEC.
(htab_create_alloc_ex): Use C90 prototype-style.
* lrealpath.c (lrealpath): Appropriately cast return value of
malloc().
* make-relative-prefix.c (save_string): Likewise.
* make-temp-file.c (try_dir): Rename from "try". Adjust use in
the file.
(choose_tmpdir): Use XNEWVEC.
* mkstemps.c (mkstemps): Rename parameter "template" to "pattern".
* pex-common.c (pex_init_common): Use XNEW.
(pex_add_remove): Use XRESIZEVEC.
(pex_run): Likewise.
(pex_get_status_and_time): Likewise.
* pex-djgpp.c (pex_djgpp_exec_child): Likewise.
* pex-msdos.c (pex_init): Use XNEW.
(pex_msdos_exec_child): Likewise.
(pex_msdos_exec_child): Use XRESIZEVEC.
* pex-unix.c (pex_wait): Use XNEW.
* pex-win32.c (fix_argv): Use XNEWVEC.
* pexecute.c (pwait): Likewise.
* setenv.c (setenv): Properly cast return value of malloc().
* sigsetmask.c (sigsetmask): Rename local variables "old" and
"new" to "old_sig" and "new_sig".
* sort.c (main): Use XNEWVEC.
* spaces.c (spaces): Cast return value of malloc().
* strndup.c (strndup): Likewise.
* ternary.c (ternary_insert): Use XNEW.
* xmalloc.c (malloc, realloc, calloc, sbrk): Surround declaration
with an extern "C" block if __cplusplus.
* xstrdup.c (xstrdup): Cast return value of memcpy().
* xstrerror.c (strerror): Enclose declaration in an extern "C"
block if __cplusplus.
* xstrndup.c (xstrndup): Use XNEW. Cast return value of memcpy().
From-SVN: r100115
2005-05-24 Paolo Carlini <pcarlini@suse.de>
* config/ia64/ia64intrin.h: Define nothing for C++:
overloaded builtins have been ported to C++.
From-SVN: r100112
* class.c (registered_class): Take it out of class_roots; turn into
a vec of trees.
(register_class): Make static. Don't duplicate decl node. Use
VEC_safe_push.
(emit_register_classes): Use VEC_iterate. Use output_constant
instead of assemble_integer. Don't call mark_decl_referenced
directly.
* java-tree.h (register_class): Remove decl.
From-SVN: r100107
2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
PR C++/21645
* g++.dg/init/ctor5.C: New test.
2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
PR C++/21645
* optimize.c (update_cloned_parm): Copy the TYPE also from the
original one.
From-SVN: r100106
2005-05-24 Jonathan Wakely <redi@gcc.gnu.org>
* include/debug/string (class basic_string): Add missing
default template arguments; provide typedefs for char
and wchar_t.
(operator[]): Allow s[s.size()] in debug mode, but not
pedantic mode.
2005-05-24 Paolo Carlini <pcarlini@suse.de>
Port from libstdcxx_so_7-branch:
2005-04-25 Christopher Jefferson <chris@bubblescope.net>
* include/bits/stl_algo.h (count): Correct concept checks.
(search_n) : Likewise.
* testsuite/25_algorithms/search_n/check_type.cc: New.
* testsuite/testsuite_iterators.h
(random_access_iterator_wrapper::operator+): Move out of
class to external function, and add symmetric version.
2005-03-14 Christopher Jefferson <chris@bubblescope.net>
* testsuite/testsuite_iterators.h (WritableObject::WritableObject):
Add const.
2005-02-01 Christopher Jefferson <chris@bubblescope.net>
* testsuite/testsuite_iterators.h (random_access_iterator_wrapper::
operator--): Fix typo.
(OutputContainer::OutputContainer): Correct zeroing array.
(WritableObject::operator==): Fix typo.
(WritableObject::operator=): make operator= templated
to allow differing types to be assigned.
(WritableObject::operator++): Fix checking if iterator is
written to multiple times.
(random_access_iterator_wrapper::operator+): Add const.
(random_access_iterator_wrapper::operator-): Likewise.
(random_access_iterator_wrapper::operator[]): Add dereference.
From-SVN: r100101
* config/m32r/m32r.c (m32r_expand_block_move): Return 0 if nothing was done.
* config/m32r/m32r.md (movmemsi): If m32r_expand_block_move did nothing then FAIL.
* config/m32r/m32r/m32r-protos.h (m32r_expand_block_move): Update prototype.
From-SVN: r100095
* tree-ssa-dom.c (cprop_into_stmt): Do not call
recompute_tree_invariant_for_addr_expr here.
(optimize_stmt): Call it here instead and do so if anything
at all has changed in the statement and the RHS is an ADDR_EXPR.
* tree-ssa-forwprop.c (tidy_after_forward_propagate_addr): If
needed, call recompute_tree_invariant_for_addr_expr.
* tree-ssa-propagate.c (substitute_and_fold): Call
recompute_tree_invariant_for_addr_expr as needed.
* gcc.c-torture/compile/pr21638.c: New test.
* gcc.c-torture/compile/20050520-1.c: New test.
From-SVN: r100092
2005-05-23 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.c (s390_optimize_prologue): Don't replace an insn
saving less registers than the replacement.
From-SVN: r100081
* config/sparc/sparc-protos.h (sparc_expand_move): New prototype.
* config/sparc/sparc.c (sparc_expand_move): New function.
(sparc_emit_set_const64): Rewrite assert condition on entry.
(legitimate_constant_p) <CONST_VECTOR>: New case.
(legitimize_pic_address): Use TARGET_ARCH64 to select the mode.
* config/sparc/sparc.md (movqi, movhi, movsi, movdi, movV32,
movV64, movtf): Use nonimmediate_operand for the first operand.
Rewrite. Only invoke sparc_expand_move.
* config/sparc/predicates.md (input_operand): Reorder tests.
From-SVN: r100077