OSDN Git Service

PR c++/37417
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index 5e5d1c2..cc70e9e 100644 (file)
@@ -1,3 +1,376 @@
+2008-09-09  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/37417
+       * tree.c (array_type_nelts_top): Add size_one_node instead of
+       integer_one_node.
+
+2008-09-09  Jason Merrill  <jason@redhat.com>
+
+       PR c++/37439
+       * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
+       DECL_CONTEXT set.
+
+2008-09-09  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/37389
+       * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
+       being error_operand_p.  Don't clear value if it was error_mark_node.
+
+2008-09-09  Paolo Bonzini  <bonzini@gnu.org>
+
+       * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
+       * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
+       * semantics.c (anon_aggr_type_p): Remove.
+
+2008-09-06  Jason Merrill  <jason@redhat.com>
+
+       PR c++/37302
+       * parser.c (cp_parser_parameter_declaration_list): Process the
+       PARM_DECLs as we go and push them.  Return a TREE_LIST.
+       (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
+       (cp_parser_direct_declarator): Create a binding level and
+       suppress deprecated warnings in the parameter list.
+       (make_call_declarator): PARMS is now a tree.
+       * cp-tree.h (struct cp_declarator): Function parms are now a tree.
+       * decl.h (enum deprecated_states, deprecated_state): Move here.
+       * decl.c: From here.
+       (type_is_deprecated): New fn.
+       (grokparms): PARMLIST is a tree now.  Warn about parms that
+       use deprecated types.
+       * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
+       0-operand cast.
+       * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
+       (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a 
+       function.
+       * name-lookup.c (pushtag): Look through function parameter scopes.
+       (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL 
+       when we're parsing a function declarator.
+
+2008-09-05  Douglas Gregor  <doug.gregor@gmail.com>
+
+       PR c++/37342
+       * tree.c (cp_build_qualified_type_real): Deal with sharing of
+       TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
+       types.
+       
+2008-09-04  Ian Lance Taylor  <iant@google.com>
+
+       * parser.c (check_no_duplicate_clause): Change code parameter to
+       enum omp_clause_code.
+
+2008-09-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/37348
+       * decl.c (cp_finish_decl): Only set
+       DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
+
+       PR c++/37189
+       * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
+       extern decls.
+       * decl2.c (mark_used): If defer_mark_used_calls, push decl into
+       deferred_mark_used_calls vector and exit early.
+       * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
+       variables.
+       (finish_function): Set defer_mark_used_calls for the duration of the
+       function.  Call mark_used on any queued decls.
+
+2008-09-02  Jason Merrill  <jason@redhat.com>
+
+       PR c++/37208
+       * call.c (build_over_call): Make =delete work with SFINAE.
+       * class.c (resolve_address_of_overloaded_function): Likewise.
+
+       * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
+       threadprivate_or_deleted_p.
+       (CP_DECL_THREADPRIVATE_P): Adjust.
+       (DECL_DELETED_FN): Likewise.
+       (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
+       (SD_DELETED): New macro.
+       * parser.c (cp_parser_init_declarator): Use them.
+       * decl.c (start_decl): Use them.
+
+       * decl2.c (mark_used): Give =deleted error even in sizeof.
+
+       * typeck2.c (check_narrowing): Downgrade narrowing error to
+       permerror.
+
+2008-09-02  Aldy Hernandez  <aldyh@redhat.com>
+
+       * typeck.c (build_array_ref): Use new location argument.
+       * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
+       * call.c (build_new_op): Same.
+       * decl2.c (grok_array_decl): Same.
+       * cp-tree.h (build_array_ref): Add location argument to prototype.
+
+2008-09-01  Aldy Hernandez  <aldyh@redhat.com>
+
+       * typeck.c (build_x_indirect_ref): Add location argument.
+       * class.c (build_base_path): Pass location to build_indirect_ref.
+       * pt.c (tsubst_copy_and_build): Pass location to
+       finish_label_address_expr.
+       * parser.c (cp_parser_unary_expression): Same.
+
+2008-08-31  Jason Merrill  <jason@redhat.com>
+
+       Implement late-specified return type using 'auto'.
+       * cp-tree.h (struct cp_declarator): Add late_return_type field to
+       function declarator.
+       * parser.c (cp_parser_late_return_type_opt): New fn.
+       (cp_parser_direct_declarator): Use it.
+       (make_call_declarator): Put it in the declarator.
+       * decl.c (grokdeclarator): Splice in late-specified return type.
+       * pt.c (splice_late_return_type): New fn.
+
+2008-08-29  Michael Meissner  <gnu@the-meissners.org>
+
+       * decl.c (builtin_function_1): Take a bool argument to decide
+       whether to use pushdecl or pushdecl_top_level.
+       (duplicate_decls): Copy function specific target and optimization
+       options on duplicate declarations.
+       (cxx_builtin_function): Update builtin_function_1 call.
+       (cxx_builtin_function_ext_scope): New function, guarantee that the
+       declaration is done at global scope.
+
+       * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
+       macro, define builtin function hook for delayed machine specific
+       builtins.
+
+       * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
+
+2008-08-30  Jason Merrill  <jason@redhat.com>
+
+       PR c++/37288
+       * pt.c (dependent_type_p): Don't abort on auto outside of a template.
+
+2008-08-29  Jason Merrill  <jason@redhat.com>
+
+       Implement C++0x 'auto' semantics.
+       * decl.c (start_decl_1): Don't complain about auto being incomplete.
+       (cp_finish_decl): Deduce auto.
+       * init.c (build_new): Handle 'new auto'.
+       * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
+       message for auto than for normal template type parms.
+       * pt.c (type_dependent_expression_p): Handle { }.
+       (make_auto): New function.
+       (listify_autos): New function.
+       (do_auto_deduction): New function.
+       (is_auto): New function.
+       (type_uses_auto): New function.
+       * cp-tree.h: Declare them.
+       * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
+       treat auto as a declspec.
+       (cp_parser_simple_type_specifier): It's a type-specifier.
+
+2008-08-29  Mark Mitchell  <mark@codesourcery.com>
+
+       * mangle.c (write_type): Add target-specific manglings for
+       non-fundamental types to the substitution table.
+       gcc/testsuite/
+
+2008-08-29  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/29635
+       PR fortran/23057
+       * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
+       Adjust debug_hooks->imported_module_or_decl callers.
+
+2008-08-29  Jan Hubicka  <jh@suse.cz>
+
+       * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
+
+2008-08-28  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/37260
+       * decl.c (reshape_init_r): Check init for error_mark_node.
+
+2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       PR c++/17880
+       * semantics.c (maybe_convert_cond): Call verify_sequence_points.
+       (finish_return_stmt): Likewise.
+       (finish_switch_condition): Likewise.
+
+2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       * cp-tree.h: Fix #error directive.
+
+2008-08-26  Douglas Gregor  <doug.gregor@gmail.com>
+
+       * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
+       usual arithmetic conversions on scoped enumeration types.
+       (common_type): Ditto.
+       (default_conversion): Don't perform integral promotions on scoped
+       enumeration types. 
+       (build_array_ref): Scoped enumeration types can't be used as
+       subscripts.
+       * decl.c (start_enum): If building a C++0x scoped enumeration,
+       enter its scope. If provided with an underlying type, check that
+       underlying type and set up the enumeration type accordingly.
+       (finish_enum): Only compute an underlying type if the underlying
+       type isn't already fixed, and only convert the enumerator values
+       now if we've just computed the underlying type. Finish the scope
+       of C++0x scoped enumerations.
+       (build_enumerator): For enumerations with a fixed underlying type,
+       check the enumerator values when the enumerator is defined.
+       (lookup_enumerator): New.
+       * call.c (standard_conversion): Don't allow assignment from
+       integers to scoped enumeration types, even with -fpermissive.
+       Don't convert from scoped enumerations to bool or any arithmetic
+       types.
+       (build_conditional_expr): Don't per the usual arithmetic
+       conversions for scoped enumeration types.
+       (convert_like_real): Check complain to see if we should
+       produce warnings.
+       * error.c (class_key_or_enum_as_string): Print scoped enums.
+       * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
+       TYPE_LANG_FLAG_5.
+       (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
+       (SCOPED_ENUM_P): New.
+       (UNSCOPED_ENUM_P): New.
+       (SET_SCOPED_ENUM_P): New.
+       (ENUM_UNDERLYING_TYPE): New.
+       * pt.c (lookup_template_class): Update the instantiation of enum
+       types to deal with C++0x scoped enumerations and underlying
+       types.
+       * name-lookup.c (begin_scope): Deal with scoped enumeration
+       scopes.
+       (lookup_qualified_name): Deal with lookup into enumeration types.
+       * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
+       * parser.c (cp_parser_class_or_namespace_name): Rename to...
+       (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
+       parse a type-name that can be an enumeration type.
+       (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
+       (cp_parser_elaborated_type_specifier): Parse the
+       optional `struct' or `class' following enum (in C++0x).
+       (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
+       enum-base clauses.
+
+2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       * typeck.c: Update all calls to pedwarn.
+       * decl.c: Likewise.
+       * call.c: Likewise.
+       * error.c: Likewise.
+       * pt.c: Likewise.
+       * name-lookup.c: Likewise.
+       * parser.c: Likewise.
+
+2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       PR c++/35158
+       * parser.c (cp_parser_omp_for_loop): Handle parenthesized
+       initializers.
+
+2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       * parser.c: Update all calls to inform.
+       * typeck.c: Likewise.
+       * init.c: Likewise.
+       * class.c: Likewise.
+       * call.c: Likewise.
+       * method.c: Likewise.
+       * friend.c: Likewise.
+       * typeck2.c: Likewise.
+       * pt.c: Likewise.
+       * name-lookup.c: Likewise.
+       * lex.c: Likewise.
+
+2008-08-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/37156
+       * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
+
+2008-08-18  Tomas Bily  <tbily@suse.cz>
+
+       * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
+
+2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       * typeck.c: Update all callers of permerror.
+       * init.c: Likewise.
+       * class.c: Likewise.
+       * decl.c: Likewise.
+       * call.c: Likewise.
+       * except.c: Likewise.
+       * cvt.c: Likewise.
+       * typeck2.c: Likewise.
+       * pt.c: Likewise.
+       * semantics.c: Likewise.
+       * name-lookup.c: Likewise.
+       * lex.c: Likewise.
+       * decl2.c: Likewise.
+       * parser.c: Likewise.
+
+2008-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/34485
+       * pt.c (check_template_shadow): Change to return a bool.
+       * name-lookup.c (push_class_level_binding): Early return if
+       check_template_shadow returns false.
+       * cp-tree.h (check_template_shadow): Adjust declaration.
+
+2008-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/34600
+       * decl.c (grokdeclarator): In case of extern and initializer, return
+       error_mark_node after the error.
+
+2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       PR 30551
+       * decl.c (grokfndecl): Call check_main_parameters_type only if
+       -Wmain.
+
+2008-08-12  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/37087
+       * parser.c (cp_parser_class_head): Early return error_mark_node in
+       case of global qualification of class name or qualified name that
+       does not name a class.
+
+2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       PR c++/12242
+       * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
+
+2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       PR 36901
+       * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
+       Delete forward declarations. Check that toplev.h has not been
+       included before this file. Include toplev.h and diagnostic.h.
+       * error.c (cp_cpp_error): Use DK_PEDWARN.
+       (cxx_incomplete_type_diagnostic): Update declaration.
+       (cxx_incomplete_type_error): Use DK_ERROR.
+       * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
+       as argument. Use emit_diagnostic.
+       (cxx_incomplete_type_error): Use DK_ERROR.
+       (add_exception_specifier): Use diagnostic_t instead of custom
+       codes.  
+       * typeck.c (complete_type_or_else): Update call to
+       cxx_incomplete_type_diagnostic.
+       * init.c (build_delete): Likewise.  
+       * call.c (diagnostic_fn_t): Remove unused typedef.
+       (build_temp): Pass a pointer to diagnostic_t.
+       (convert_like_real): Use emit_diagnostic.
+       (joust): Check return value of warning before giving informative
+       note.  
+       * friend.c (do_friend): Check return value of warning
+       before giving informative note.
+       * parser.c (cp_parser_template_id): Likewise.
+
+2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       PR 7651
+       * class.c (check_bases_and_members): Warn with -Wuninitialized
+       instead of -Wextra.
+       
+2008-08-08  Volker Reichelt  <v.reichelt@netcologne.de>
+
+       PR c++/35985
+       * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
+       and make sure it is not a union.
+
 2008-08-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        * semantics.c (finish_decltype_type): Initialize type.
        * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
        copy constructors and copy assignment operators proper.
 
-2008-07-21  Rafael Avila de Espindola  <espindola@google.com>
+2008-07-21  Rafael Ávila de Espíndola  <espindola@google.com>
 
        * parser.c (cp_token): Remove in_system_header.
        (eof_token): Remove in_system_header.
        * init.c (avoid_placement_new_aliasing): New static function.
        (build_new_1): Call it.
 
-2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
+2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
 
        * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
        (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
        * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
        type only if is a class type (5.2.8/4).
 
-2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
+2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
 
        * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
        * decl.c (grokdeclarator): Use unsigned_type_for instead of
 
        * call.c (build_new_op): Call warn_logical_operator.
 
-2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
+2007-03-08  Volker Reichelt  <v.reichelt@netcologne.de>
 
        PR c++/30852
        * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
        * decl.c (grokdeclarator): Disable warnings for anonymous
        bitfields.
 
-2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
+2007-03-05  Volker Reichelt  <v.reichelt@netcologne.de>
 
        * typeck2.c (readonly_error): Always emit a hard error.
        Remove last argument.