OSDN Git Service

PR c++/23194
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index 74b1b15..df1a46b 100644 (file)
@@ -1,3 +1,285 @@
+2008-06-24  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       PR c++/23194
+       * typeck.c (cp_build_function_call): Show example syntax in
+       diagnostic.
+
+2008-06-21  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
+       cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
+       pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
+       build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
+       pedwarn to permerror.
+       * init.c (perform_member_init, build_new_1, build_new): Likewise.
+       * decl.c (warn_extern_redeclared_static, duplicate_decls,
+       * identify_goto, check_previous_goto_1, check_goto, define_label,
+       check_tag_decl, start_decl, check_class_member_definition_namespace,
+       grokfndecl, grokdeclarator): Likewise.
+       * except.c (check_handlers): Likewise.
+       * typeck2.c (digest_init): Likewise.
+       * pt.c (check_specialization_namespace,
+       check_explicit_instantiation_namespace,
+       maybe_process_partial_specialization, check_explicit_specialization,
+       convert_template_argument, do_decl_instantiation,
+       do_type_instantiation, instantiate_decl): Likewise.
+       * semantics.c (finish_template_type_parm): Likewise.
+       * name-lookup.c (pushdecl_maybe_friend,
+       check_for_out_of_scope_variable): Likewise.
+       * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
+       coerce_new_type): Likewise.
+       * parser.c (cp_parser_nested_name_specifier_opt,
+       cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
+       cp_parser_class_head, cp_parser_check_class_key): Likewise.
+       (cp_parser_parameter_declaration): Check flag_permissive instead of
+       flag_pedantic_errors.
+       * call.c (joust): Change pedwarn to warning.
+       * friend.c (make_friend_class): Likewise.
+
+2008-06-16  Jan Hubicka  <jh@suse.cz>
+
+       * method.c: Include cgraph.h.
+       (use_thunk): Use cgraph_add_new_function instead of calling backend
+       directly.
+
+2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * parser.c: Fix comment typo.
+
+2008-06-14  Simon Martin  <simartin@users.sourceforge.net>
+
+       PR c++/35320
+       * decl2.c (grokbitfield): Receive the list of attributes, pass it to
+       grokdeclarator and apply it to the created declaration.
+       * cp-tree.h (grokbitfield): Update prototype.
+       * parser.c (cp_parser_member_declaration): Don't apply the attributes
+       since they are now applied in grokbitfield. Adjusted the call to
+       grokbitfield.
+       (cp_parser_objc_class_ivars): Likewise.
+
+2008-06-14  Simon Martin  <simartin@users.sourceforge.net>
+
+       PR c++/35317
+       * class.c (type_requires_array_cookie): Do not consider delete[]
+       operators with an ellipsis as second argument.
+
+2008-06-09  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/36408
+       * semantics.c (stmt_expr_value_expr): Don't crash on empty
+       STATEMENT_LIST.
+
+2008-06-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+        PR c++/35242
+        * pt.c (maybe_process_partial_specialization): Check the tree
+       returned by push_template_decl for error_mark_node.
+       * parser.c (cp_parser_class_head): Likewise, check the tree
+       returned by the latter. 
+
+2008-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
+
+        PR c++/35327
+        * decl.c (grokdeclarator): In case of wrong return type return
+       immediately error_mark_node.
+
+2008-06-06  Jakub Jelinek  <jakub@redhat.com>
+
+       * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
+       dependent_omp_for_p, begin_omp_task, finish_omp_task,
+       finish_omp_taskwait): New prototypes.
+       (cxx_omp_clause_default_ctor): Add outer argument.
+       (finish_omp_for): Add new clauses argument.
+       * cp-gimplify.c (cxx_omp_finish_clause): New function.
+       (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
+       (cxx_omp_clause_default_ctor): Add outer argument.
+       (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
+       * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
+       * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
+       Add par_clauses argument.  If decl is present in parallel's
+       lastprivate clause, change that clause to shared and add
+       a lastprivate clause for decl to OMP_FOR_CLAUSES.
+       Fix wording of error messages.  Adjust finish_omp_for caller.
+       Add clauses argument.  Parse loops with random access iterators.
+       (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
+       functions.
+       (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
+       cp_parser_omp_for_loop callers.
+       (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
+       functions.
+       (cp_parser_omp_clause_name): Handle collapse and untied
+       clauses.
+       (cp_parser_omp_clause_schedule): Handle auto schedule.
+       (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
+       and PRAGMA_OMP_CLAUSE_UNTIED.
+       (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
+       (OMP_TASK_CLAUSE_MASK): Define.
+       (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
+       (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
+       (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
+       PRAGMA_OMP_TASKWAIT.
+       * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
+       OMP_CLAUSE_UNTIED.  Handle OMP_CLAUSE_LASTPRIVATE_STMT.
+       (tsubst_omp_for_iterator): New function.
+       (dependent_omp_for_p): New function.
+       (tsubst_expr) <case OMP_FOR>: Use it.  Handle collapsed OMP_FOR
+       loops.  Adjust finish_omp_for caller.  Handle loops with random
+       access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR} changes.
+       (tsubst_expr): Handle OMP_TASK.
+       * semantics.c (cxx_omp_create_clause_info): New function.
+       (finish_omp_clauses): Call it.  Handle OMP_CLAUSE_UNTIED and
+       OMP_CLAUSE_COLLAPSE.
+       (cxx_omp_predetermined_sharing): Removed.
+       * semantics.c (finish_omp_for): Allow pointer iterators.  Use
+       handle_omp_for_class_iterator and dependent_omp_for_p.  Handle
+       collapsed for loops.  Adjust c_finish_omp_for caller.  Add new
+       clauses argument.  Fix check for type dependent cond or incr.
+       Set OMP_FOR_CLAUSES to clauses.  Use cp_convert instead of
+       fold_convert to convert incr amount to difference_type.  Only
+       fold if not in template.  If decl is mentioned in lastprivate
+       clause, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle loops with random
+       access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR}
+       changes.
+       (finish_omp_threadprivate): Allow static class members of the
+       current class.
+       (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
+       finish_omp_taskwait): New functions.
+
+       * parser.c (cp_parser_binary_expression): Add prec argument.
+       (cp_parser_assignment_expression): Adjust caller.
+       * cp-tree.h (outer_curly_brace_block): New prototype.
+       * decl.c (outer_curly_brace_block): No longer static.
+
+2008-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
+
+        PR c++/36404
+        * pt.c (push_template_decl_real): Consistently return error_mark_node
+       on error.
+
+2008-06-02  Tomas Bily  <tbily@suse.cz>
+
+        * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
+        (cp_build_unary_op): Likewise.
+        (cp_build_indirect_ref): Use CONVERT_EXPR_P.
+        (maybe_warn_about_returning_address_of_local): Likewise.
+
+2008-05-29  Paolo Carlini  <paolo.carlini@oracle.com>
+
+        PR c++/35243
+        * pt.c (tsubst_initializer_list): Consistently check the tree
+        returned by tsubst_pack_expansion for error_mark_node.
+
+2008-05-27  Michael Matz  <matz@suse.de>
+
+       PR c++/27975
+       * call.c (build_new_op): Make warning conditional on
+       OPT_Wenum_compare.
+
+2008-05-27  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR c++/35909
+       * call.c (convert_like_real): Convert bitfield to desired type
+       before creating temporary.
+
+2008-05-26  Daniel Franke  <franke.daniel@gmail.com>
+
+       * Makefile.in: Adjusted dependencies on c-incpath.o.
+
+2008-05-23  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/36237
+       * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
+       fold_build_cleanup_point_expr on build_call_a results.
+
+       PR c++/36308
+       * semantics.c (omp_clause_info_fndecl): New function.
+       (finish_omp_clauses): Use it.
+
+2008-05-21  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/36023
+       * cp-tree.h (check_array_initializer): New prototype.
+       * decl.c (check_array_initializer): New function.
+       (check_initializer): Call it.
+       * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
+
+2008-05-21  Tom Tromey  <tromey@redhat.com>
+
+       * mangle.c (save_partially_mangled_name): Remove.
+       (restore_partially_mangled_name): Likewise.
+       (write_encoding): Update.
+       (write_unqualified_name): Likewise.
+       (start_mangling): Always use name_obstack.  Remove 'ident_p'
+       argument.
+       (get_identifier_nocopy): Remove.
+       (finish_mangling_internal): Rename from finish_mangling.
+       (finish_mangling): New function.
+       (finish_mangling_get_identifier): Likewise.
+       (partially_mangled_name, partially_mangled_name_len): Remove.
+       (mangle_decl_string): Change return type.  Update.
+       (mangle_decl, mangle_type_string, mangle_special_for_type,
+       mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
+       mangle_ref_init_variable): Update.
+
+2008-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
+
+        PR c++/35331
+        * semantics.c (begin_class_definition): Extend checks on the first
+       argument.
+
+2008-05-12  Tomas Bily  <tbily@suse.cz>
+
+        * typeck2.c (digest_init): Use CONVERT_EXPR_P.
+        * call.c (build_over_call): Likewise.
+        * error.c (dump_expr): Use CASE_CONVERT.
+        * class.c (fixed_type_or_null): Likewise.
+
+2008-05-11  Volker Reichelt  <v.reichelt@netcologne.de>
+
+       * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
+       in error message.
+       (cp_parser_omp_clause_schedule): Remove superfluous "expected"
+       in error message.
+
+2008-05-07  Kenneth Zadeck  <zadeck@naturalbridge.com>
+
+       * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
+       DECL_LOOPING_CONST_OR_PURE_P attributes.
+       * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
+       DECL_PURE_P.
+
+2008-05-02  Simon Baldwin  <simonb@google.com>
+
+       PR bootstrap/36108
+       * typeck.c (build_array_ref): Remove warn_array_subscript_range.
+
+2008-05-01  Simon Baldwin  <simonb@google.com>
+
+       * typeck.c (build_array_ref): Call warn_array_subscript_range.
+
+2008-04-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/35986
+       * pt.c (more_specialized_fn): Stop the loop even if there are no
+       arguments before ellipsis.
+
+2008-04-29  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/35650
+       * parser.c (cp_parser_lookup_name): Look through single function
+       OVERLOAD.
+
+       PR c++/35987
+       * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
+       COMPOUND_EXPR if the second argument would be error_mark_node.
+
+2008-04-28  Jason Merrill  <jason@redhat.com>
+           Liu Guanwei <liu_gw@163.com>
+
+       PR c++/57
+       * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
+       in default arguments.
+
 2008-04-25  Jan Hubicka  <jh@suse.cz>
 
        * typeck.c (check_return_expr): Update.