OSDN Git Service

* decl.c (get_atexit_fn_ptr_type): New function.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index df07249..ec14928 100644 (file)
@@ -1,3 +1,159 @@
+2007-05-31  Mark Mitchell  <mark@codesourcery.com>
+
+       * decl.c (get_atexit_fn_ptr_type): New function.
+       (get_atexit_node): Use it.
+       (start_cleanup_fn): Likewise.
+       (register_dtor_fn): Use the object's destructor, instead of a
+       separate cleanup function, where possible.
+       * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
+       (atexit_fn_ptr_type_node): New macro.
+       * decl2.c (build_cleanup): Use build_address.
+
+2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
+
+       * typeck.c (build_binary_op): Include types in error.
+
+2007-05-31  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/31806
+       * decl.c (cp_finish_decl): Also clear was_readonly if a static var
+       needs runtime initialization.
+
+2007-05-31  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/32158
+       * semantics.c (finish_trait_expr): Complete the types.
+
+2007-05-30  Russell Yanofsky <russ@yanofsky.org>
+            Douglas Gregor <doug.gregor@gmail.com>
+            Pedro Lamarao <pedro.lamarao@mndfck.org>
+            Howard Hinnant <howard.hinnant@gmail.com>
+
+       PR c++/7412
+       PR c++/29939
+       * typeck.c (comptypes): Don't consider rvalue and lvalue
+       reference types to be equivalent.
+       (check_return_expr): Move from certain lvalues when returning
+       them.
+       * decl.c (grokdeclarator): Implement reference collapsing.
+       (copy_fn_p): Don't consider constructors taking rvalue references
+       to be copy constructors.
+       (move_fn_p): New.
+        * call.c (conversion): New "rvaluedness_matches_p" member.
+       (convert_class_to_reference): Require reference type as first
+       parameter instead of base type.
+       (reference_binding): Add logic to handle rvalue references.
+       (implicit_conversion): Update inaccurate comment.
+       (convert_like_real): Disable creation of temporaries that are
+       impossible to initialize for types with move constructors.
+       (build_over_call): Elide move constructors when possible.
+       (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
+       (maybe_handle_ref_bind): Return conversion instead of type node.
+       (compare_ics): Add logic to use "rvaluedness_matches_p" values to
+       determine preferred conversion sequences.
+       * cp-tree.h (TYPE_REF_IS_RVALUE): New.
+       (LOOKUP_PREFER_RVALUE): New.
+       (DECL_MOVE_CONSTRUCTOR_P): New.
+       (struct cp_declarator): Add "reference" member for reference
+       types, with new "rvalue_ref" flag.
+       (cp_build_reference_type): Declare.
+       (move_fn_p): Declare.
+       * error.c (dump_type_prefix): Format rvalue reference types
+       correctly in error messages.
+       * except.c (build_throw): Move from certain lvalues when
+       throwing.
+       * mangle.c (write_type): Mangle rvalue references differently
+       than regular references.
+       * parser.c (make_reference_declarator): Add boolean parameter for
+       rvalue references.
+       (cp_parser_make_indirect_declarator): New.
+       (cp_parser_new_declarator_opt): Call
+       cp_parser_make_indirect_declarator. 
+       (cp_parser_conversion_declarator_opt): Ditto.
+       (cp_parser_declarator): Ditto.
+       (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
+       declarators.
+       * pt.c (tsubst): Implement reference collapsing.
+       (maybe_adjust_types_for_deduction): Implement special template
+       parameter deduction rule for rvalue references.
+       (type_unification_real): Update calls to
+       maybe_adjust_types_for_deduction.
+       (try_one_overload): Ditto.
+       (unify_pack_expansion): Ditto.
+       * tree.c (lvalue_p_1): Handle rvalue reference types.
+       (cp_build_reference_type): New.
+
+2007-05-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/31809
+       * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
+       variables that need runtime initialization.
+
+2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
+
+        PR c++/31339
+       * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
+       case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
+       case POSTDECREMENT_EXPR>): Return the error_mark_node
+       if either the real or imaginary parts would an
+       error_mark_node.
+       
+2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
+           Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       PR c++/31745
+       * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
+       token is a closing brace, false if there are no tokens left.
+       (cp_parser_namespace_alias_definition): Only consume the next token if
+       it is a closing brace.
+
+       * parser.c (cp_parser_class_specifier): Likewise.
+
+2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * semantics.c (finish_member_declaration): Fix a typo in the
+       last checkin.
+
+2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
+
+       PR c++/31431
+       PR c++/31432
+       PR c++/31434
+       PR c++/31435
+       PR c++/31437
+       PR c++/31438
+       PR c++/31442
+       PR c++/31443
+       PR c++/31444
+       PR c++/31445
+       * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
+       * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
+       * pt.c (check_for_bare_parameter_packs): Return bool indicated
+       whether everything was okay. Fix indentation.
+       (push_template_decl_real): Check for bare parameter packs in
+       function parameters; where errors occur, mark the parameter types
+       with ERROR_MARK_NODEs to avert ICEs.
+       (coerce_template_parameter_pack): New.
+       (coerce_template_parms): Moved parameter pack coercion into
+       coerce_template_parameter_pack, and permit it anywhere in the
+       template parameter list (not just at the end). Parameter and
+       argument indices can vary (somewhat) separately now, so add
+       PARM_IDX and ARG_IDX.
+       (fn_type_unification): Don't set an argument pack as incomplete if
+       no argument pack was deduced.
+       (type_unification_real): If a type parameter is a parameter pack
+       and has not otherwise been deduced, it will be deduced to an empty
+       parameter pack.
+       (more_specialized_fn): Use the actual lengths of the argument
+       lists when comparing against expansions.
+       * semantics.c (finish_member_declaration): If a field's type has
+       bare parameter packs, error and set its type to ERROR_MARK_NODE.
+
+2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       PR target/27067
+       * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
+
 2007-05-22  Ollie Wild  <aaw@google.com>
 
        * name-lookup.c (ambiguous_decl): Adds check for hidden types.