OSDN Git Service

PR c++/33501
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index 1aeacba..d62d29d 100644 (file)
@@ -1,3 +1,371 @@
+2007-11-07  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/33501
+       * call.c (build_over_call): Don't check TREE_ADDRESSABLE
+       on incomplete type.
+
+2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
+
+       PR c++/33977
+       PR c++/33886
+       * tree.c (c_build_qualified_type): Define bridge to
+       cp_build_qualified_type.
+
+2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
+
+       PR c++/31439
+       PR c++/32114
+       PR c++/32115
+       PR c++/32125
+       PR c++/32126
+       PR c++/32127
+       PR c++/32128
+       PR c++/32253
+       PR c++/32566
+       * typeck.c (check_return_expr): Pass address of retval to
+       check_for_bare_parameter_packs.
+       * class.c (build_base_field): Tolerate bases that have no layout
+       due to errors.
+       (end_of_base): Ditto.
+       * tree.c (canonical_type_variant): Be careful with
+       ERROR_MARK_NODE.
+       * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
+       tree*.
+       * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
+       which states whether parameter packs should be replaced with
+       ERROR_MARK_NODE.
+       (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
+       possible. If set_packs_to_error is set true, replace the parameter
+       pack with ERROR_MARK_NODE. Manage our own pointer sets.
+       (uses_parameter_packs): Don't set parameter packs to
+       ERROR_MARK_NODE.
+       (check_for_bare_parameter_packs): Now takes a pointer to a tree,
+       which may be modified (if it is a parameter pack). Instructs
+       find_parameter_packs_r to replace parameter packs with
+       ERROR_MARK_NODE (so that they won't cause errors later on).
+       (process_template_parm): Pass pointer to
+       check_for_bare_parameter_packs.
+       (process_partial_specialization): Replace pack expansions before
+       the end of the template argument list with ERROR_MARK_NODE.
+       (push_template_decl_real): Pass pointer to
+       check_for_bare_parameter_packs. Replace parameter packs not at the
+       end of the template parameter list with ERROR_MARK_NODE.
+       (convert_template_argument): Be more careful about using DECL_NAME
+       on only declarations.
+       (unify): Can't unify against ERROR_MARK_NODE.
+       * semantics.c (finish_cond): Pass pointer to
+       check_for_bare_parameter_packs.
+       (finish_expr_stmt): Ditto.
+       (finish_for_expr): Ditto.
+       (finish_switch_cond): Pass pointer to
+       check_for_bare_parameter_packs, and call it before we put the
+       condition into the statement.
+       (finish_mem_initializers): Pass pointer to
+       check_for_bare_parameter_packs.
+       (finish_member_declaration): Ditto.
+       * parser.c (cp_parser_base_clause): Ditto.
+       
+2007-11-06  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/33168
+       * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
+       with the final TREE_READONLY flag in place.  processing_template_decl
+       is known to be 0 in this part of function.
+
+       PR c++/33894
+       * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
+       OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
+       * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
+       * semantics.c (finish_omp_atomic): Revert most of the
+       2007-02-05 changes, just keep the new representation of
+       OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
+
+2007-11-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR c++/33871
+       * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
+       local.
+
+2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
+
+       PR c++/33996
+       PR c++/33235
+       PR c++/33930
+       * typeck.c (merge_types): Don't lose rvalue references when
+       merging types.
+       * call.c (build_over_call): Don't elide move constructors just
+       because the copy constructor is trivial (!).
+       (compare_ics): If comparing cv-qualifiers fails, we can still order
+       based on binding lvalues vs. rvalues.
+
+2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
+
+       PR c++/33939
+       * pt.c (unify_pack_expansion): bring handling of function call
+       arguments into line with type_unification_real. 
+
+2007-11-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       * typeck.c (build_binary_op): Use pedwarn instead of error for
+       consistency.
+
+2007-11-05  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/33836
+       * parser.c (cp_parser_unary_expression): For &&label call
+       cp_parser_non_integral_constant_expression and return error_mark_node
+       if it returned true.
+
+       PR c++/33969
+       * decl.c (grokdeclarator): Don't call build_memfn_type if type
+       is neither FUNCTION_TYPE nor METHOD_TYPE.
+
+2007-11-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/33516
+       * parser.c (cp_parser_nested_name_specifier_opt): Use
+       TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
+       typedef of currently open class.
+
+2007-11-02  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/33495
+       * error.c (dump_expr): Deal specially with statements.
+
+2007-11-01  Jason Merrill  <jason@redhat.com>
+
+       PR c++/30897
+       * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
+       template parms.
+       (lookup_template_class): Use it to get the outer template args
+       for instantiating one.
+
+       PR c++/29236
+       * pt.c (reduce_template_parm_level): tsubst the parameters
+       of a template template parm.
+
+2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>
+
+       PR c++/33955
+       * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
+
+2007-11-01  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/32384
+       * parser.c (cp_parser_postfix_dot_deref_expression): If
+       POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
+       first and if that succeeds and type is SCALAR_TYPE_P, create
+       PSEUDO_DTOR_EXPR.
+
+       PR c++/32260
+       * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
+       (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
+       as for std::type_info.
+
+2007-10-31  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/33494
+       * cxx-pretty-print.c (pp_cxx_typeid_expression,
+       pp_cxx_delete_expression): Change to static linkage.
+       * cxx-pretty-print.h: Adjust declarations.
+       * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
+       MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
+       MODOP_EXPR): Forward to pp_expression.
+
+       * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
+       Fix typo.
+
+2007-10-31 Christian Bruel  <christian.bruel@st.com>
+           Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/19531
+       * typeck.c (check_return_expr): Don't set named_return_value_okay_p
+       if retval is volatile. 
+       
+2007-10-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/33616
+       * decl2.c (build_offset_ref_call_from_tree): Call
+       build_non_dependent_expr on object prior to building ADDR_EXPR from it
+       if FN is DOTSTAR_EXPR.
+
+2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>
+
+       PR c++/31993
+       PR c++/32252
+       * pt.c (find_parameter_packs_r): Fix typo in comment.
+       (convert_template_argument): Look at the pattern of a pack
+       expansion to determine what kind of entity we're converting.
+       (coerce_template_parameter_pack): When we have coerced a non-type
+       template parameter pack, substitute into the type of that pack.
+       (tsubst_pack_expansion): When our substitution of a parameter pack
+       is a "trivial" substitution of itself, just substitute into the
+       pack expansion rather than actually expanding.
+
+2007-10-29  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/33841
+       * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
+       for non-integral type bitfields.  Return true if bitfield is correct, false
+       error has been diagnosed.
+       (check_field_decls): If check_bitfield_decl returned false, call also
+       check_field_decl.
+
+2007-10-28  Paolo Carlini  <pcarlini@suse.de>
+           Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/30659
+       * pt.c (do_decl_instantiation): If the VAR_DECL is not a
+       class member error out and return.
+
+2007-10-27  Jakub Jelinek  <jakub@redhat.com>
+
+       * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
+       to current_function_decl rather than 0.
+
+       PR c++/33844
+       * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
+       ->* rather than .*.
+       * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
+
+2007-10-27  Jason Merrill  <jason@redhat.com>
+
+       PR c++/5247
+       * call.c (convert_default_arg): Detect recursion.
+
+2007-10-27  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/33842
+       * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
+       * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
+       OFFSETOF_EXPR.
+       (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
+       functions.
+       * error.c (dump_expr): Handle OFFSETOF_EXPR.
+
+2007-10-26  Jason Merrill  <jason@redhat.com>
+
+       PR c++/24791
+       * pt.c (get_template_info): New fn.
+       (template_class_depth): Use it.
+       (push_template_decl_real): Check that the template args of the 
+       definition match the args of the previous declaration.
+
+2007-10-26  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/31988
+       * decl2.c (coerce_new_type): Do not allow a default argument for
+       the first parameter.
+
+2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>
+
+       PR c++/33839
+       * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
+       don't see the leading '('. Only lookup names if we get an
+       IDENTIFIER_NODE.
+
+2007-10-26  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/33744
+       * parser.c (cp_parser_parenthesized_expression_list): Set
+       greater_than_is_operator_p to true in between the parens.
+
+2007-10-26  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/31747
+       * decl.c (grokdeclarator): In case of conflicting specifiers
+       just return error_mark_node.
+
+2007-10-26  Ollie Wild  <aaw@google.com>
+
+       * expr.c (cxx_expand_expr): Removed.
+       * cp-tree.h (exx_expand_expr): Removed.
+       * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
+       with c_expand_expr.
+
+2007-10-25  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/33843
+       * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
+
+2007-10-23  Jason Merrill  <jason@redhat.com>
+
+       PR c++/25950 (DR 391)
+       * call.c (struct conversion): Remove check_copy_constructor_p.
+       (reference_binding): Always bind a reference directly to a 
+       compatible class rvalue.  Pass down LOOKUP_NO_TEMP_BIND during 
+       temporary creation.
+       (check_constructor_callable): Remove.
+       (convert_like_real): Don't call it.
+       (initialize_reference): Don't call check_constructor_callable.
+       (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
+       LOOKUP_CONSTRUCTOR_CALLABLE.  Don't require a temporary for base
+       conversions if LOOKUP_NO_TEMP_BIND.
+       (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
+       (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
+       second conversion.
+       * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
+
+2007-10-22  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/33372
+       * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
+       before checking if its type is integral.
+
+2007-10-22  Jason Merrill  <jason@redhat.com>
+
+       PR c++/33620
+       * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
+       * pt.c (apply_late_template_attributes): Splice out dependent
+       attributes from DECL_ATTRIBUTES.
+
+       * decl.c (cxx_maybe_build_cleanup): Use build_address.
+
+2007-10-17  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       * typeck.c (build_binary_op) : Use appropriate warning option
+       instead of unnamed warning.
+
+2007-10-16  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/31446
+       * pt.c (current_template_args): Do not change TREE_LIST elements
+       with a TREE_VALUE of error_mark_node.
+
+2007-10-16  Mark Mitchell  <mark@codesourcery.com>
+
+       * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
+       * decl.c (start_decl): Tidy.
+       (start_decl_1): Call cp_apply_type_quals_to_decl after completing
+       the type.
+       (grokdeclarator): Clarify comment.
+
+2007-10-14  Andrew Pinski  <pinskia@gmail.com>
+
+       PR c++/30303
+       * decl.c (grokfndecl): Return NULL after the "definition of
+       implicitly-declared" error happened.
+
+2007-10-12  Simon Martin  <simartin@users.sourceforge.net>
+
+       PR c++/26698
+       * call.c (build_user_type_conversion_1): Do not consider conversion
+       functions to convert a (possibly cv-qualified) object to the (possibly
+       cv-qualified) same object type (or a reference to it), to a (possibly
+       cv-qualified) base class of that type (or a reference to it).
+
+2007-10-12  Paolo Carlini  <pcarlini@suse.de>
+
+       * pt.c (tsubst): Use template_parm_level_and_index.
+
+2007-10-12  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/32121
+       * parser.c (cp_parser_compound_statement): Handle label-declarations
+       at the beginning of the compound statement.
+       (cp_parser_block_declaration): Issue diagnostics about __label__
+       not at the beginning of a block.
+
 2007-10-11  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/33461