OSDN Git Service

2006-08-17 Paolo Bonzini <bonzini@gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index f666fab..7048c5f 100644 (file)
@@ -1,5 +1,501 @@
+2006-08-17  Paolo Bonzini  <bonzini@gnu.org>
+
+       PR c++/28573
+       * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
+
+2006-08-16  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR c++/28302
+       * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
+       perform_integral_promotions for non integral type.
+
+2006-08-16  Jason Merrill  <jason@redhat.com>
+
+       PR c++/28385
+       * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
+       if arg is a function.
+
+2006-08-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/28593
+       * init.c (build_new): Return early on invalid placement.
+
+2006-08-15  Lee Millward  <lee.millward@codesourcery.com>
+
+       PR c++/28594
+       * pt.c (process_template_parm): Robustify.
+       
+2006-08-14  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/28288
+       PR c++/14556
+       * operators.def: Remove <?, ?>, <?=, and >?= operators.
+       * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
+       (cp_parser_warn_min_max): Remove.
+
+2006-08-11  Jason Merrill  <jason@redhat.com>
+
+       PR c++/28559
+       * parser.c (cp_parser_elaborated_type_specifier): Also ignore
+       attributes applied to a TYPENAME_TYPE.
+
+2006-08-09  Lee Millward  <lee.millward@codesourcery.com>
+
+       PR c++/28637
+       * pt.c (coerce_template_parms): Copy across the
+       invalid template arguments to the new template inner arguments.
+       (retrieve_specialization): Robustify.
+
+       PR c++/28638
+       * pt.c (coerce_template_template_parms): Robustify.
+
+       PR c++/28639
+       * error.c (dump_template_parms): Robustify.
+
+       PR c++/28640
+       * pt.c (redeclare_class_template): Robustify.
+
+       PR c++/28641
+       * pt.c (type_unification_real): Robustify.
+       
+2006-08-03  Lee Millward  <lee.millward@codesourcery.com>
+
+       PR c++/28347
+       * decl.c (start_decl): Return error_mark_node if a
+       diagnostic was issed for an invalid typedef initialization.
+       
+2006-08-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/27508
+       * parser.c (cp_parser_unqualified_id): Check for invalid scopes
+       when parsing destructor names.
+
+       PR c++/28274
+       * decl.c (duplicate_decls): Call check_default_args here.
+       (start_preparsed_function): Do not call check_default_args.
+       * name-lookup.c (pushdecl_maybe_friend): Only call
+       check_default_args if duplicate_decls got bypassed.
+
+2006-08-02  Richard Guenther  <rguenther@suse.de>
+
+       PR c++/28479
+       Revert
+       2006-07-05  Richard Guenther  <rguenther@suse.de>
+       Andrew Pinski  <pinskia@gcc.gnu.org>
+
+       PR c++/27084
+       * cp-objcp-common.c (cxx_types_compatible_p): Ignore
+       top level qualifiers for pointer type comparisons.
+
+2006-08-02  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/28557
+       * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
+
+2006-07-31  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/28523
+       * tree.c (stabilize_expr): Tweak documentation.  Add assertion.
+       (stabilize_call): Tweak documentation.
+       (stabilize_init): Only call stabilize_call for calls.
+
+2006-08-01  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/28432
+       * decl2.c (check_classfn): Remove early return.
+       * search.c (lookup_member): Return NULL with bad type.
+
+2006-08-01  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/28256
+       * decl.c (check_initializer): Check for 1 initializer on scalar types.
+
+2006-08-01  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       PR debug/23336
+       * pt.c (tsubst_copy_and_build): Mark used enum types.
+       * semantics.c (finish_id_expression): Likewise.
+
+2006-07-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/6634
+       * decl.c (grokdeclarator): Check whether "long" or "short" was
+       specified for non-integral types.
+
+2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
+
+2006-07-28  Lee Millward  <lee.millward@codesourcery.com>
+
+        PR c++/27668
+        PR c++/27962
+        * pt.c (process_template_parm) Store invalid template
+        parameters as error_mark_node in the paramater list.
+        (push_inline_template_parms_recursive): Handle invalid
+        template parameters.
+        (comp_template_parms): Likewise.
+        (check_default_tmpl_arg): Likewise.
+        (coerce_template_template_parms): Likewise.
+        (mangle_class_name_for_template): Likewise.
+        (tsubst_template_parms): Likewise.
+        * error.c (dump_template_argument_list): Likewise.
+       
+2006-07-28  Kazu Hirata  <kazu@codesourcery.com>
+
+       * cp-tree.h: Fix a comment typo.
+
+2006-07-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/27572
+       * decl.c (grokdeclarator): Return error_mark_node after invalid
+       typedef.
+
+2006-07-23  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       PR c++/28460
+       * decl.c (grokvardecl): Use FROB_CONTEXT.
+       * pt.c (register_specialization): Likewise.
+
+2006-07-23  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/28025
+       * cp-tree.h (LOOKUP_HIDDEN): New macro.  Reformat comments.
+       * name-lookup.c (unqualified_namespace_lookup): There is no way to
+       have a hidden name in non-namespace scopes.
+       * pt.c (tsubst_friend_class): Look for hidden names.
+       * decl.c (lookup_and_check_tag): Fix typo in comment.
+
+       * semantics.c (finish_compound_literal): Fix typo in comment.
+
+2006-07-21  Jason Merrill  <jason@redhat.com>
+
+       * decl2.c (determine_visibility): Don't propagate visibility from
+       type to decl.
+       (constrain_class_visibility): Don't warn in system headers.
+       Don't warn about pointer fields.
+
+2006-07-20  Mike Stump  <mrs@apple.com>
+
+       * decl2.c (determine_visibility_from_class): Don't use hidden
+       visibility for explicit instantiations.
+
+2006-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/28250
+       * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
+       valid decls.  Cleanup.
+
+       PR c++/28363
+       * semantics.c (check_template_template_default_arg): Simplify
+       error handling.
+
+2006-07-20  Jason Merrill  <jason@redhat.com>
+
+       PR c++/28407
+       * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
+       const variables with implicit internal linkage.
+       * tree.c (decl_linkage): Only return lk_external if it's set.
+
+       PR c++/28409
+       * decl2.c (constrain_visibility): Ignore the anonymous namespace 
+       for extern "C" decls.
+       (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
+
+       * decl2.c (constrain_visibility): Remove specified and reason 
+       parameters.  Don't touch decls that already have explicit visibility.
+       (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from 
+       template.
+       (determine_visibility_from_class): Reverse sense of 
+       DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
+       (constrain_class_visibility): Only complain about member visibility
+       if the member type is another class.  Don't change visibility of the
+       current class.
+
+2006-07-19  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/28338
+       * decl.c (layout_var_decl): Don't call push_local_name here.
+       (initialize_artificial_var): Assert artificiality.
+       (cp_finish_decl): Call push_local_name here.
+
+2006-07-18  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/28337
+       * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
+       templates.
+
+2006-07-18  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/28048
+       * semantics.c (check_accessibility_of_qualified_id): Robustify.
+
+       PR c++/28235
+       * pt.c (tsubst_decl): Handling substitutions into a static data
+       member from within the scope of the tempalte itself.
+
+2006-07-18  Lee Millward  <lee.millward@gmail.com>
+
+       PR c++/28258
+       * method.c (locate_copy): Check for non_reference
+       returning error_mark_node.
+
+        PR c++/28260
+       * decl.c (duplicate_decls): Return error_mark_node
+       on ambiguous declaration.
+       
+2006-07-18  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/27495
+       * search.c (adjust_result_of_qualified_name_lookup): Change
+       assert to part of if statement.
+
+2006-07-17  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/28291
+       * decl.c (reshape_init_class): Return error_mark_node on error.
+
+2006-07-17  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/28304
+       * decl2.c (check_classfn): Return NULL_TREE on error.
+
+2006-07-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/28250
+       * name-lookup.c (pushdecl_maybe_friend): Return early on
+       error_mark_node.
+       * except.c (expand_start_catch_block): Use error_mark_node instead
+       of NULL_TREE for invalid decls.
+       * parser.c (cp_parser_exception_declaration): Return error_mark_node
+       on invalid catch parameter. Simplify.
+
+2006-07-16  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/28370
+       * decl2.c (note_vague_linkage_var): Removed.
+       (finish_static_data_member_decl): Add decl to pending_statics vector
+       directly.  Do it even for non-public decls.
+
+2006-07-15  Lee Millward  <lee.millward@gmail.com>
+
+       PR c++/28292
+       * decl2.c (acceptable_java_type): Robustify. Use
+       proper Boolean return type instead of return 1.
+       (check_java_method): Don't issue error about
+       type not being an acceptable Java parameter if 
+       it's error_mark_node.
+       
+       PR c++/28269
+       * parser.c (cp_parser_elaborated_type_specifier):
+       Return early if an invalid type was detected.
+       
+2006-07-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/28249
+       * parser.c (cp_parser_check_decl_spec): New function.
+       (cp_parser_decl_specifier_seq): Factor out check for repeated
+       decl-specifiers into cp_parser_check_decl_spec. Use it.
+       (cp_parser_type_specifier_seq): Use it.
+
+       PR c++/28294
+       * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
+       only.
+
+       PR c++/28387
+       * decl2.c (cplus_decl_attributes): Check for invalid decls.
+
+2006-07-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/28343
+       * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
+       * decl2.c (grokfield): Likewise.
+
+2006-07-12  Geoffrey Keating  <geoffk@apple.com>
+
+       * decl2.c (determine_visibility): Don't change visibility of
+       function locals because of -fvisibility-inlines-hidden.
+
+2006-07-12  Jason Merrill  <jason@redhat.com>
+
+       PR c++/28217
+       * semantics.c (note_decl_for_pch): Don't premangle templates.
+
+2006-07-12  Martin Michlmayr  <tbm@cyrius.com>
+
+       * typeck.c (string_conv_p): Remove spurious quotation mark in
+       warning.
+
+2006-07-07  Lee Millward  <lee.millward@gmail.com>
+           Andrew Pinski  <pinskia@gmail.com>
+
+       PR c++/27820
+       * decl.c (define_label): Return error_mark_node on error.
+       * semantics.c (finish_label_stmt): Don't call
+       add_stmt for invalid labels.
+       
+2006-07-06  Jason Merrill  <jason@redhat.com>
+
+       PR c++/28279
+       * decl2.c (finish_static_data_member_decl): Don't assert
+       TREE_PUBLIC.
+
+2006-07-05  Jason Merrill  <jason@redhat.com>
+
+       PR c++/13983
+       PR c++/17519
+       * class.c (check_field_decls): Check TYPE_PACKED after
+       stripping array types.
+       (finish_struct_bits): Don't copy TYPE_SIZE here.
+
+       PR c++/18681
+       * friend.c (is_friend): Fix DR 45 implementation.
+
+2006-07-05  Richard Guenther  <rguenther@suse.de>
+       Andrew Pinski  <pinskia@gcc.gnu.org>
+
+       PR c++/27084
+       * cp-objcp-common.c (cxx_types_compatible_p): Ignore
+       top level qualifiers for pointer type comparisons.
+
+2006-07-01  Jason Merrill  <jason@redhat.com>
+
+       PR c++/28215
+       * method.c (make_thunk): Unset DECL_USE_TEMPLATE and 
+       DECL_TEMPLATE_INFO.
+
+2006-06-30  Jason Merrill  <jason@redhat.com>
+
+       PR c++/26577
+       * call.c (build_new_method_call): Force evaluation of the 
+       instance pointer, not the object.
+
+2006-06-30  Kazu Hirata  <kazu@codesourcery.com>
+
+       * decl2.c: Fix a comment typo.
+
+2006-06-30  Jason Merrill  <jason@redhat.com>
+
+       PR c++/18698
+       * decl2.c (grokfield): Only try to treat the decl as an access 
+       declaration if the scope is a class.
+
+2006-06-29  Jason Merrill  <jason@redhat.com>
+
+       PR c++/26905
+       PR c++/26612
+       PR c++/27000
+       PR c++/26984
+       PR c++/19134
+       * decl2.c (determine_visibility): Overhaul.
+       (determine_visibility_from_class): Likewise.
+       (min_vis_r, type_visibility, constrain_visibility): New fns.
+       (constrain_visibility_for_template): Likewise.
+       (constrain_class_visibility): Likewise.
+       * decl.c (cp_finish_decl): Call determine_visibility for function
+       decls, too.
+       * name-lookup.c (pushtag): Call determine_visibility.
+       * decl.c (duplicate_decls): Don't copy visibility from template to
+       specialization.
+       * pt.c (check_explicit_specialization): Likewise.
+       (lookup_template_class, tsubst_decl): Call determine_visibility.
+       * class.c (finish_struct_1): Call constrain_class_visibility.
+
+       PR c++/26905
+       PR c++/21675
+       PR c++/17470
+       * parser.c (cp_parser_explicit_instantiation): Pass the attributes
+       to grokdeclarator.
+       (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
+       (cp_parser_enum_specifier): Likewise.
+       (cp_parser_elaborated_type_specifier): Apply attributes if this
+       declares only the class.
+       (cp_parser_class_specifier): Apply leading attributes immediately.
+       * semantics.c (begin_class_definition): Add attributes parameter,
+       apply them to the type.
+
+       PR c++/21581
+       PR c++/25915
+       * tree.c (decl_anon_ns_mem_p): New function.
+       * cp-tree.h: Declare it.
+       * decl2.c (determine_visibility): Make anonymous namespace
+       members static.
+       (min_vis_r, constrain_visibility): Likewise.
+       * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
+       pseudo-types.
+       * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
+       global_namespace.
+       * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
+       on anonymous namespaces.
+
+2006-06-28  Jason Merrill  <jason@redhat.com>
+
+       PR c++/27424
+       * pt.c (convert_template_argument): Pass all template arguments 
+       on to coerce_template_template_parms.
+
+2006-06-25  Lee Millward  <lee.millward@gmail.com>
+           Mark Mitchell <mark@codesuorcery.com>
+
+       PR c++/28054
+       * decl2.c (grokbitfied): Remove check for grokdeclarator
+       returning NULL_TREE, instead check for error_mark_node
+       to indicate failure.
+       * decl.c (grokdeclarator): Adjust block comment.
+       
+2006-06-25  Lee Millward  <lee.millward@gmail.com>
+
+       PR c++/28051
+       * mangle.c (mangle_conv_op_name_for_type): Check for
+       invalid types.
+       * name-lookup.c (push_class_level_binding): Robustify.
+       (do_class_using_decl): Return early if name is error_mark_node.
+       
+2006-06-23  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/28114
+       * name-lookup.c (pushtag): Return if we have error_mark_node.
+
+2006-06-23  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/27019
+       * typeck2.c (process_init_constructor_array): Set ce->value on errors.
+
+2006-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/28112
+       * parser.c (cp_parser_attribute_list): Skip attributes with invalid
+       arguments.  Fix comment.
+
+       PR c++/11468
+       * init.c (build_new_1): Handle error_mark_nodes returned by
+       build_java_class_ref.
+       (build_java_class_ref): Do not abort compilation, but return
+       error_mark_node.  Improve error message.  Fix indentation.
+
+2006-06-23  Danny Smith   <dannysmith@users.sourceforge.net>
+
+       PR target/27789
+       * decl.c (start_decl): Check that dllimports are not initialized.
+
+2006-06-22  Lee Millward  <lee.millward@gmail.com>
+
+       PR c++/27805
+       * typeck2.c (build_m_component_ref): Use error_operand_p.
+
+       PR c++/27821
+       * decl.c (grokdeclarator): Return error_mark_node on
+       invalid uses of the scope resolution operator.
+       
 2006-06-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
+       PR c++/28111
+       * pt.c (determine_specialization): Check for invalid decls.
+
+       PR c++/28110
+       * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
+       parameters.
+
        PR c++/28109
        * rtti.c (get_tinfo_decl_dynamic): Robustify.