2004-05-22 Benjamin Kosnik <bkoz@redhat.com>
* libsupc++/cxxabi.h: Remove duplicated and useless public and
private keywords in class declarations. Format. Use
stddef.h. Expose declarations to "C" compilation.
* libsupc++/tinfo.cc (__upcast_result): Add copy constructor and
assignment operator.
(__dyncast_result): Same.
* libsupc++/vec.cc (uncatch_exception): Same, use member
initialization list.
From-SVN: r82147
PR c++/15507
* class.c (layout_nonempty_base_or_field): Do not try to avoid
layout conflicts for unions.
PR c++/15542
* typeck.c (build_x_unary_op): Instantiate template class
specializations before looking for "operator &".
PR c++/15427
* typeck.c (complete_type): Layout non-dependent array types, even
in templates.
PR c++/15287
* typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
template.
PR c++/15507
* g++.dg/inherit/union1.C: New test.
PR c++/15542
* g++.dg/template/addr1.C: New test.
PR c++/15427
* g++.dg/template/array5.C: New test.
PR c++/15287
* g++.dg/template/array6.C: New test.
From-SVN: r82144
2004-05-22 Andrew Pinski <pinskia@physics.uc.edu>
* c-common.c (c_common_truthvalue_conversion): Handle
UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
i.e. set the type to truthvalue_type_node and return.
2004-05-22 Zack Weinberg <zack@codesourcery.com>
* tree.h (struct tree_decl): Add possibly_inlined bit.
(DECL_POSSIBLY_INLINED): New accessor macro.
* cgraph.h: Remove declaration of cgraph_inline_hash.
* cgraph.c: Remove definition of cgraph_inline_hash.
(hash_node): Revert to hashing DECL_UID.
(eq_node): Take two pointers to cgraph_node structures.
Compare DECL_UIDs.
(cgraph_remove_node): Pass the node directly to htab_find_slot.
(cgraph_varpool_hash_node): Rename hash_varpool_node;
hash on DECL_UID.
(eq_cgraph_varpool_node): Rename eq_varpool_node; take two
pointers to cgraph_varpool_node structures; compare DECL_UIDs.
(cgraph_node): Allocate a temporary node on the stack, fill in
its DECL field, and pass that to htab_find_slot.
(cgraph_varpool_node): Likewise.
(cgraph_function_possibly_inlined_p): If global info is ready,
return the DECL_POSSIBLY_INLINED bit.
* cgraphunit.c (cgraph_mark_inline_edge): Set DECL_POSSIBLY_INLINED
instead of mucking with cgraph_inline_hash.
From-SVN: r82140
* name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
returning when TREE_TYPE is error_mark_node.
* typeck.c (require_complete_type): Return error_mark_node if
value's type is an error_mark_node.
* g++.dg/lookup/forscope2.C: New test case.
From-SVN: r82133
* c.opt (Wmissing-include-dirs): New.
* c-opts.c (c_common_handle_option): Pass true for user_supplied_p
to add_path () for -I, but false for OPT_idirafter, OPT_iquote and
OPT_isystem. Handle case OPT_Wmissing_include_dirs.
* c-incpath.h (add_path): Add fourth (bool) argument.
* c-incpath.c (add_env_var_paths): Pass false to add_path ().
(add_standard_paths): Likewise.
(remove_duplicates) [REASON_NOENT]: Warn if -Wmissing-include-dirs
is used and the directory was user-supplied via -I.
(add_path): Set p->user_supplied_p. Remove duplicated code by
using add_cpp_dir_path ().
* cpplib.h (struct cpp_options): Add warn_missing_include_dirs.
(struct cpp_dir): Add user_supplied_p.
* doc/invoke.texi (Warning Options): Document new option.
[testsuite]
* gcc.dg/cpp/Wmissingdirs.c: New.
From-SVN: r82121
* io.c (check_format): As a GNU extension, allow the comma after a
string literal to be optional in a format. Use gfc_notify_std to
issue an error/warning as appropriate.
* io/format.c (parse_format_list): Allow the comma after a string
literal to be optional.
From-SVN: r82109
2004-05-21 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl: Whenever a recursive target is defined, wrap
it in a special @if/@endif block, and prepare its maybe
dependency in the @if/@endif block
* configure.in: Instead of writing maybe dependencies, remove
the @if/@endif statements, and remove the @if/@endif blocks
that remain.
* Makefile.in: Regenerate.
* configure: Regenerate.
From-SVN: r82088
PR middle-end/3074
* fold-const.c (strip_compound_expr): Delete function.
(count_cond): Delete function.
(fold_binary_op_with_conditional_arg): Only perform transformations
"a + (b?c:d) -> b ? a+c : a+d" and "(b?c:d) + a -> b ? c+a : d+a"
when a is constant. This greatly simplifies this routine.
* tree.c (saved_expr_p): Delete function.
* tree.h (saved_expr_p): Delete function prototype.
* gcc.dg/pr3074-1.c: New test case.
* gcc.dg/sequence-pt-1.c: Remove an XFAIL.
From-SVN: r82071
2004-05-20 Paolo Carlini <pcarlini@suse.de>
* include/bits/istream.tcc (operator>>(basic_istream<>&,
basic_string<>&)): Use a temporary buffer, thus avoiding
reallocation for common case.
* testsuite/21_strings/basic_string/inserters_extractors/char/11.cc:
New.
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc:
Likewise.
* include/bits/istream.tcc: Const-ification of a few variables.
* include/bits/ostream.tcc: Trivial formatting fixes and
const-ification of some variables.
From-SVN: r82070