OSDN Git Service

Fix PR c++/42260 and ensure PR c++/45383 is fixed
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index 784f3aa..40dd7e2 100644 (file)
@@ -1,3 +1,207 @@
+2010-11-29  Dodji Seketeli  <dodji@redhat.com>
+
+       PR c++/42260
+       * call.c (add_builtin_candidate): At this point the resulting type
+       of an indirection operator should be complete.
+
+2010-11-29  Dodji Seketeli  <dodji@redhat.com>
+
+       PR c++/45383
+       Reverted patch for PR c++/42260
+       * cp-tree.h (lookup_conversions): Reverted "Add new bool parameter to
+       declarationE."
+       * search.c (lookup_conversion): Reverted "Use new bool parameter in
+       definition".
+       * call.c (add_builtin_candidates): Reverted "Don't lookup template
+       conversion"
+       (convert_class_to_reference, build_user_type_conversion_1,
+        build_op_call): Reverted "Adjust".
+       * cvt.c (build_expr_type_conversion): Reverted "Likewise".
+
+2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * parser.c (cp_parser_objc_try_catch_finally_statement): Parse
+       @catch(...)  and pass NULL_TREE to objc_begin_catch_clause() in
+       that case.  Improved error recovery.  Reorganized code to be
+       almost identical to c_parser_objc_try_catch_finally_statement.
+
+2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       PR objc++/46222
+       * decl.c (grokdeclarator): Replaced an assert (for a case that can
+       never happen in C++, but could happen in ObjC++ for invalid code)
+       with a check that prints an error message and returns
+       error_mark_node.
+
+2010-11-23  Jeffrey Yasskin <jyasskin@google.com>
+
+       PR c++/46527
+       * pt.c (instantiate_decl): Propagate the template's location to
+       its instance.
+
+2010-11-20  Joseph Myers  <joseph@codesourcery.com>
+
+       * name-lookup.c (handle_namespace_attrs): Don't check
+       HANDLE_PRAGMA_VISIBILITY.
+       * parser.c (cp_parser_namespace_definition): Don't check
+       HANDLE_PRAGMA_VISIBILITY.
+
+2010-11-20  Nathan Froyd  <froydnj@codesourcery.com>
+
+       PR c++/16189
+       PR c++/36888
+       PR c++/45331
+       * parser.c (cp_lexer_set_token_position): New function.
+       (cp_lexer_previous_token_position): New function.
+       (cp_lexer_previous_token): Call it.
+       (cp_parser_class_specifier): Try to gracefully handle a missing
+       semicolon.
+
+2010-11-20  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/46538
+       * decl.c (cp_make_fname_decl): Return error_mark_node if
+       current_binding_level has already sk_function_parms kind.
+
+       PR c++/46526
+       * semantics.c (cxx_eval_call_expression): Unshare the result.
+
+2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * parser.c (cp_parser_objc_protocol_declaration): Pass attributes
+       to objc_declare_protocols.
+
+2010-11-18  Nathan Froyd  <froydnj@codesourcery.com>
+
+       PR c/33193
+       * typeck.c (cp_build_unary_op): Call build_real_imag_expr for
+       REALPART_EXPR and IMAGPART_EXPR.
+
+2010-11-16  Jason Merrill  <jason@redhat.com>
+
+       * call.c (convert_like_real): Don't make a temp for copy-list-init.
+       (build_over_call): Don't handle that here.
+       (build_new_method_call): Use COMPLETE_OR_OPEN_TYPE_P for error.
+
+       PR c++/46497
+       * call.c (build_over_call): Check for =delete even when trivial.
+
+       DR 1004
+       * decl.c (make_unbound_class_template): Handle using
+       injected-type-name as template.
+
+2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * typeck.c (cp_build_unary_op): Use
+       objc_build_incr_expr_for_property_ref to build the pre/post
+       increment/decrement of an Objective-C property ref.
+
+2010-11-13  Jason Merrill  <jason@redhat.com>
+
+       * decl.c (cp_finish_decl): Use resolve_nondeduced_context for auto.
+       * init.c (build_new): Likewise.
+       * pt.c (tsubst_decl): Likewise.
+       (do_auto_deduction): Likewise.
+       (resolve_nondeduced_context): Use build_offset_ref and
+       cp_build_addr_expr.
+
+2010-11-12  Joseph Myers  <joseph@codesourcery.com>
+
+       * Make-lang.in (g++spec.o): Use $(OPTS_H).
+
+2010-11-13  Ville Voutilainen <ville.voutilainen@gmail.com> <ville.voutilainen@symbio.com>
+
+       Core 1135, 1136, 1145, 1149
+       * method.c (defaultable_fn_check): Do not disallow defaulting a
+       non-public or explicit special member function on its first
+       declaration.
+
+2010-11-12  James Dennett <jdennett@google.com>
+
+       PR/39415
+       * typeck.c (build_static_cast_1): Convert to the target type
+       when doing static_cast<cv Derived*>(Base*).
+
+2010-11-10  Jason Merrill  <jason@redhat.com>
+
+       PR c++/46420
+       * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: New case.
+       [CONSTRUCTOR]: Use the tsubsted type.
+
+       PR c++/46369
+       * semantics.c (cxx_eval_bit_field_ref): New.
+       (cxx_eval_constant_expression): Call it.
+
+2010-11-10  Joseph Myers  <joseph@codesourcery.com>
+
+       * cvt.c (cp_convert_to_pointer): Use %' in diagnostic.
+       * decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator):
+       Use %' in diagnostics.
+       * decl2.c (check_classfn): Use %' in diagnostic.
+       * init.c (build_java_class_ref): Use %' in diagnostic.
+       (build_delete): Remove trailing '.' from diagnostic.
+       * method.c (do_build_copy_assign, walk_field_subobs): Use %' in
+       diagnostics.
+       * name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic.
+       * parser.c (cp_parser_exception_specification_opt): Remove
+       trailing '.' from diagnostic.
+       (cp_parser_objc_interstitial_code): Use %qs for quoting in
+       diagnostic.
+       * pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in
+       diagnostic.
+       * repo.c (reopen_repo_file_for_write): Use %' in diagnostic.
+
+2010-11-10  Nathan Froyd  <froydnj@codesourcery.com>
+
+       PR c++/46065
+       * decl.c (poplevel_named_label_1): Use TREE_CHAIN if necessary.
+
+2010-11-09  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/45894
+       * tree.c (lvalue_kind): Don't crash if ref has NULL type.
+
+2010-11-08  Jason Merrill  <jason@redhat.com>
+
+       PR c++/46382
+       * semantics.c (check_constexpr_ctor_body): New fn.
+       * parser.c (cp_parser_ctor_initializer_opt_and_function_body): Call it.
+       * cp-tree.h: Declare it.
+
+       PR c++/46335
+       * tree.c (bot_manip): Check TREE_SIDE_EFFECTS as well.
+
+       Correct conversion/overflow behavior.
+       * cvt.c (ignore_overflows): Move here from typeck.c.
+       (ocp_convert): Use it.
+       (cp_fold_convert): Use it.  Don't call rvalue.
+       * typeck.c (build_static_cast_1): Don't use it.  Do call rvalue.
+       * error.c (location_of): Handle expressions, too.
+       * class.c (check_bitfield_decl): Set input_location around call to
+       cxx_constant_value.
+       * semantics.c (cxx_eval_outermost_constant_expr): Don't
+       print the expression if it already had TREE_OVERFLOW set.
+       (reduced_constant_expression_p): Check TREE_OVERFLOW_P for C++98, too.
+       (verify_constant): Allow overflow with a permerror if we're
+       enforcing.
+       (cxx_eval_outermost_constant_expr): Use verify_constant.
+       (adjust_temp_type): Use cp_fold_convert.
+       * decl.c (build_enumerator): Don't call constant_expression_warning.
+       * decl2.c (grokbitfield): Likewise.
+
+2010-11-06  Jason Merrill  <jason@redhat.com>
+
+       PR c++/46348
+       * init.c (perform_member_init): Use build_vec_init_expr for
+       value-init of arrays, too.
+       * cp-gimplify.c (cp_gimplify_expr): Use VEC_INIT_EXPR_VALUE_INIT.
+       * cp-tree.h (VEC_INIT_EXPR_IS_CONSTEXPR): New macro.
+       (VEC_INIT_EXPR_VALUE_INIT): New macro.
+       * semantics.c (potential_constant_expression): No longer static.
+       Check VEC_INIT_EXPR_IS_CONSTEXPR.
+       * tree.c (build_vec_init_expr): Handle value-init.  Set
+       VEC_INIT_EXPR_IS_CONSTEXPR and VEC_INIT_EXPR_VALUE_INIT.
+
 2010-11-06  Nathan Froyd  <froydnj@codesourcery.com>
 
        PR c++/45332
        (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
        * parser.c (cp_parser_objc_encode_expression): Updated comment.
 
-2010-10-07  Nicola Pero  <nicola@nicola.brainstorm.co.uk>
+2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        Merge from apple/trunk branch on FSF servers.