1. 07 Mar, 2008 1 commit
    • revert: re PR c++/35049 (g++.dg/conversion/simd3.C:12: error: invalid operands… · 96d84882
      revert: re PR c++/35049 (g++.dg/conversion/simd3.C:12: error: invalid operands to binary + (have 'float __vector__' and 'int __vector__'))
      
      cp:
      2008-03-07  Paolo Bonzini  <bonzini@gnu.org>
      
      	Revert:
      
      	2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/35049
      	PR c++/35096
      	* typeck.c (structural_comptypes): Call cp_comptypes.
      	(comptypes): New; called from the C/C++ common bits to perform
      	strict checks.
      	(cp_comptypes): Renamed from comptypes, which is already used,
      	with a different signature, by the C++ front end.
      	(build_reinterpret_cast_1): Call cp_comptypes.
      	(ptr_reasonably_similar): Ditto.
      	* decl.c (decls_match): Ditto.
      	* cvt.c (convert_to_reference): Ditto.
      	* cp-tree.h (same_type_p): Ditto.
      	(same_or_base_type_p): Ditto.
      	(comptypes): Rename to cp_comptypes.
      	* pt.c (canonical_type_parameter): Call cp_comptypes.
      
      objcp:
      2008-03-07  Paolo Bonzini  <bonzini@gnu.org>
      
      	Revert:
      
      	2008-02-07  Andreas Tobler  <andreast-list@fgznet.ch>
      	            Douglas Gregor  <doug.gregor@gmail.com>
       
      	PR bootstrap/35115
      	* objcp-decl.c (objcp_comptypes): Call cp_comptypes, not comptypes.
      
      From-SVN: r133007
      Paolo Bonzini committed
  2. 26 Feb, 2008 1 commit
    • system.h (USE_MAPPED_LOCATION): Poison. · 2d593c86
      gcc
      	* system.h (USE_MAPPED_LOCATION): Poison.
      	* Makefile.in (GTFILES): Put CPP_ID_DATA_H first.
      	* tree-cfg.c (make_cond_expr_edges): Remove old location code.
      	(make_goto_expr_edges): Likewise.
      	(remove_bb): Likewise.
      	(execute_warn_function_return): Likewise.
      	* basic-block.h (struct edge_def) <goto_locus>: Change type to
      	location_t.
      	* c-common.c (fname_decl): Remove old location code.
      	* tree-vect-transform.c (vect_finish_stmt_generation): Remove old
      	location code.
      	* rtl.h (ASM_OPERANDS_SOURCE_LOCATION): Remove old-location
      	variant.
      	(ASM_INPUT_SOURCE_LOCATION): Likewise.
      	(gen_rtx_ASM_INPUT): Likewise.
      	(gen_rtx_ASM_INPUT_loc): Likewise.
      	(get_rtx_asm_OPERANDS): Remove.
      	* cfglayout.c (insn_locators_alloc): Remove old location code.
      	(set_curr_insn_source_location): Likewise.
      	(curr_insn_locator): Likewise.
      	* print-tree.c (print_node): Remove old location code.
      	* tree-mudflap.c (mf_varname_tree): Remove old location code.
      	(mf_file_function_line_tree): Remove test of USE_MAPPED_LOCATION.
      	* cfgexpand.c (expand_gimple_cond_expr): Don't use
      	location_from_locus.
      	(construct_exit_block): Remove old location code.
      	* emit-rtl.c (force_next_line_note): Remove old location code.
      	* profile.c (branch_prob): Remove old location code.
      	* tree-vectorizer.h (LOC, UNKNOWN_LOC, EXPR_LOC, LOC_FILE,
      	LOC_LINE): Remove old-location variants.
      	* langhooks.c (lhd_print_error_function): Remove old location
      	code.
      	* configure, config.in: Rebuilt.
      	* configure.ac (--enable-mapped-location): Remove.
      	* c-decl.c (c_init_decl_processing): Remove old location code.
      	(finish_function): Likewise.
      	* recog.c (decode_asm_operands): Remove old location code.
      	* c-pch.c (c_common_read_pch): Remove old location code.
      	* rtl.def (ASM_INPUT, ASM_OPERANDS): Remove old location
      	variants.
      	* gimple-low.c (lower_function_body): Remove old location code.
      	* toplev.c (unknown_location): Remove.
      	(push_srcloc): Remove old-location variant.
      	(process_options): Remove old location code.
      	(lang_dependent_init): Likewise.
      	* input.h (UNKNOWN_LOCATION): Move definition.
      	(location_t): Undeprecate.
      	(source_locus): Remove.
      	(location_from_locus): Remove.
      	(struct location_s): Remove.
      	Remove all old-location code.
      	(input_line, input_filename): Remove.
      	* final.c (final_scan_insn): Remove old location code.
      	* diagnostic.c (diagnostic_build_prefix): Remove
      	USE_MAPPED_LOCATION test.
      	* tree.h (gimple_stmt) <locus>: Now a location_t.
      	(tree_exp) <locus>: Likewise.
      	(DECL_IS_BUILTIN): Remove old-location variant.
      	(annotate_with_file_line, annotate_with_locus): Likewise.
      	(expr_locus, set_expr_locus): Update.
      	* tree.c (build1_stat): Remove old location code.
      	(last_annotated_node): Remove.
      	(annotate_with_file_line): Remove old-location variant.
      	(annotate_with_locus): Likewise.
      	(expr_location): Remove old location code.
      	(set_expr_location): Likewise.
      	(expr_has_location): Likewise.
      	(expr_locus): Likewise.
      	(set_expr_locus): Likewise.
      	(expr_filename): Don't use location_from_locus.
      	(expr_lineno): Likewise.
      	* rtl-error.c (location_for_asm): Remove old location code.
      	* c-lex.c (cb_line_change): Remove old location code.
      	(fe_file_change): Likewise.
      	(cb_def_pragma): Likewise.
      	(c_lex_with_flags): Likewise.
      	* gengtype.c (do_typedef): Don't special-case location types.
      	(define_location_structures): Remove.
      	(main): Don't call define_location_structures.
      	* tree-pretty-print.c (dump_implicit_edges): Remove old location
      	code.
      gcc/ada
      	* misc.c (internal_error_function): Remove test of
      	USE_MAPPED_LOCATION.
      	* trans.c (gigi): Remove test of USE_MAPPED_LOCATION.
      	(Sloc_to_locus): Remove old location code.
      gcc/cp
      	* parser.c (eof_token): Remove old location code.
      	(check_empty_body): Remove test of USE_MAPPED_LOCATION.
      	* decl2.c (generate_ctor_or_dtor_function): Remove old location
      	code.
      	(cp_write_global_declarations): Likewise.
      	* lex.c (cxx_init): Remove old location code.
      	(handle_pragma_implementation): Remove test of
      	USE_MAPPED_LOCATION.
      	* pt.c (tsubst): Remove old location code.
      	* error.c (cp_print_error_function): Remove test of
      	USE_MAPPED_LOCATION.
      	* decl.c (pop_label): Remove old location code.
      	(finish_function): Likewise.
      gcc/fortran
      	* trans-io.c (set_error_locus): Remove old location code.
      	* trans-decl.c (gfc_set_decl_location): Remove old location code.
      	* f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
      	* scanner.c (gfc_gobble_whitespace): Remove old location code.
      	(get_file): Likewise.
      	(preprocessor_line): Likewise.
      	(load_file): Likewise.
      	(gfc_new_file): Likewise.
      	* trans.c (gfc_trans_runtime_check): Remove old location code.
      	(gfc_get_backend_locus): Likewise.
      	(gfc_set_backend_locus): Likewise.
      	* data.c (gfc_assign_data_value): Remove old location code.
      	* error.c (show_locus): Remove old location code.
      	* gfortran.h (gfc_linebuf): Remove old location code.
      	(gfc_linebuf_linenum): Remove old-location variant.
      gcc/java
      	* lang.c (java_post_options): Remove conditional.
      	* expr.c (expand_byte_code): Remove old location code.
      	* jcf-parse.c (set_source_filename): Remove old location code.
      	(give_name_to_class): Likewise.
      	(jcf_parse): Likewise.
      	(duplicate_class_warning): Likewise.
      	(parse_class_file): Likewise.
      	(java_parse_file): Likewise.
      	* decl.c (finish_method): Remove old location code.
      	* class.c (push_class): Remove old location code.
      gcc/objc
      	* objc-act.c (objc_init): Remove old location code.
      gcc/treelang
      	* tree1.c (treelang_init): Remove old location code.
      	(treelang_parse_file): Likewise.
      	* lex.l (LINEMAP_POSITION_FOR_COLUMN): Remove.
      	(update_lineno_charno): Remove old location code.
      
      From-SVN: r132679
      Tom Tromey committed
  3. 22 Feb, 2008 1 commit
    • re PR c++/35282 (Template specialization rejected) · 54062fc0
      /testsuite
      2008-02-22  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/35282
      	* g++.dg/template/nontype17.C: Add.
      
      /cp
      2008-02-22  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/35282
      	Revert:
      	2008-02-14  Paolo Carlini  <pcarlini@suse.de>
      
              PR c++/28743
              * pt.c (determine_specialization): In case of function templates,
      	when the type of DECL does not match FN there is no match.
      
      /testsuite
      2008-02-22  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/35282
      	Revert:
      	2008-02-14  Paolo Carlini  <pcarlini@suse.de>
      
              PR c++/28743
      	* g++.dg/template/nontype17.C: New.
              * g++.dg/template/nontype16.C: Add error.
      
      From-SVN: r132543
      Paolo Carlini committed
  4. 19 Feb, 2008 1 commit
  5. 15 Feb, 2008 2 commits
    • re PR c++/35023 (ICE with parameter pack in variable declaration) · 92fab505
      2008-02-15  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/35023
      	PR c++/35024
      	PR c++/35026
      	* pt.c (finish_member_template_decl): If the type in a TYPE_DECL
      	is error_mark_node, return an error early.
      	(find_parameter_packs_r): Pass the pointer set along to recursive
      	calls of cp_walk_subtrees; don't try to manage the pointer set
      	ourselves.
      	(uses_parameter_packs): Pass the pointer set to cp_walk_tree.
      	(make_pack_expansion): Ditto.
      	(check_for_bare_parameter_packs): Ditto. Also, don't bother taking
      	a second pass through the tree with find_parameter_packs_r; that
      	second pass no longer does anything.
      	(push_template_decl_real): If we have an erroneous declaration,
      	set its type to error_mark_node before returning an error.
      
      2008-02-15  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/35023
      	PR c++/35024
      	PR c++/35026
      	* g++.dg/cpp0x/vt-35026.C: New.
      	* g++.dg/cpp0x/vt-35023.C: New.
      	* g++.dg/cpp0x/vt-34055.C: Tweak expected error messages.
      	* g++.dg/cpp0x/vt-35024.C: New.
      
      From-SVN: r132348
      Douglas Gregor committed
    • re PR c++/34050 (ICE derived classes and variadic templates) · 625b6d91
      2008-02-14  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/34050
      	* pt.c (tsubst_initializer_list): Deal with the use of
      	VOID_TYPE_NODE to indicate value-initialization of the bases.
      
      
      2008-02-14  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/34050
      	* g++.dg/cpp0x/vt-34050.C: New.
      
      From-SVN: r132331
      Douglas Gregor committed
  6. 14 Feb, 2008 1 commit
    • re PR c++/28743 (ICE with invalid specialization) · 4571259b
      /cp
      2008-02-14  Paolo Carlini  <pcarlini@suse.de>
      
              PR c++/28743
              * pt.c (determine_specialization): In case of function templates,
      	when the type of DECL does not match FN there is no match.
      
      /testsuite
      2008-02-14  Paolo Carlini  <pcarlini@suse.de>
      
              PR c++/28743
      	* g++.dg/template/nontype17.C: New.
              * g++.dg/template/nontype16.C: Add error.
      
      From-SVN: r132316
      Paolo Carlini committed
  7. 13 Feb, 2008 1 commit
  8. 12 Feb, 2008 1 commit
  9. 06 Feb, 2008 1 commit
    • re PR c++/35049 (g++.dg/conversion/simd3.C:12: error: invalid operands to binary… · f76e50b9
      re PR c++/35049 (g++.dg/conversion/simd3.C:12: error: invalid operands to binary + (have 'float __vector__' and 'int __vector__'))
      
      2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/35049
      	PR c++/35096
      	* typeck.c (structural_comptypes): Call cp_comptypes.
      	(comptypes): New; called from the C/C++ common bits to perform
      	strict checks.
      	(cp_comptypes): Renamed from comptypes, which is already used,
      	with a different signature, by the C++ front end.
      	(build_reinterpret_cast_1): Call cp_comptypes.
      	(ptr_reasonably_similar): Ditto.
      	* decl.c (decls_match): Ditto.
      	* cvt.c (convert_to_reference): Ditto.
      	* cp-tree.h (same_type_p): Ditto.
      	(same_or_base_type_p): Ditto.
      	(comptypes): Rename to cp_comptypes.
      	* pt.c (canonical_type_parameter): Call cp_comptypes.
      
      2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/35049
      	PR c++/35096
      	* g++.dg/ext/vector13.C: New.
      
      From-SVN: r132152
      Douglas Gregor committed
  10. 05 Feb, 2008 1 commit
  11. 04 Feb, 2008 1 commit
    • re PR c++/33916 (Default constructor fails to initialize array members) · 0fcedd9c
              PR c++/33916
              * cp/init.c (build_value_init_1): New function.
              (build_value_init): New function.
              * cp/typeck2.c (build_functional_cast): Call it.
              * cp/cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
      
              * cp/cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
              TYPE_HAS_CONSTRUCTOR.
              * cp/class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
              add_implicitly_declared_members): Adjust.
              (check_field_decls): Adjust. Remove warnings about reference/const
              in class without constructor.
              (check_bases_and_members): Adjust.  Give those warnings here instead.
              * cp/decl.c (fixup_anonymous_aggr): Adjust.
              (check_initializer): Adjust, clarify logic slightly.
              (grok_special_member_properties): Adjust, only set if user-provided.
              * cp/rtti.c (create_tinfo_types): Don't set.
              * cp/cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
              Use same_type_ignoring_top_level_qualifiers_p.
              * cp/pt.c (check_explicit_specialization): Adjust.
              (instantiate_class_template): Adjust.
      
              * print-tree.c (print_node) [CONSTRUCTOR]: Print elements.
      
      Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
      
      From-SVN: r132088
      Jason Merrill committed
  12. 29 Jan, 2008 1 commit
    • re PR c++/34055 (ICE with invalid specialization of variadic template) · 7b3e2d46
      2008-01-29  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/34055
      	PR c++/34103
      	PR c++/34219
      	PR c++/34606
      	PR c++/34753
      	PR c++/34754
      	PR c++/34755
      	PR c++/34919
      	PR c++/34961
      	* c-pretty-print.c (pp_c_type_qualifier_list): Don't try to print
      	qualifiers for an ERROR_MARK_NODE or a NULL_TREE.
      
      
      2008-01-29  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/34055
      	PR c++/34103
      	PR c++/34219
      	PR c++/34606
      	PR c++/34753
      	PR c++/34754
      	PR c++/34755
      	PR c++/34919
      	PR c++/34961
      	* typeck.c (check_return_expr): Tweak call to
      	check_for_bare_parameter_packs.
      	* class.c (add_method): Be careful with error_mark_nodes.
      	* cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
      	signature.
      	* pt.c (struct find_parameter_pack_data): Remove
      	SET_PACKS_TO_ERROR.
      	(find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
      	(uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
      	(make_pack_expansion): Ditto.
      	(check_for_bare_parameter_packs): Parameter is now a tree, not a
      	tree*.
      	(process_template_parm): Tweak call to
      	check_for_bare_parameter_packs.  
      	(push_template_decl_real): Tweak calls to
      	check_for_bare_parameter_packs. If bare parameter packs are found
      	in the list of exceptions, clear out that list after giving an
      	error.
      	* semantics.c (finish_cond): Tweak call to
      	check_for_bare_parameter_packs.
      	(finish_expr_stmt): Ditto.
      	(finish_for_expr): Ditto.
      	(finish_switch_cond): Ditto.
      	(finish_mem_initializers): Ditto.
      	(finish_member_declaration): Ditto.
      	(finish_static_assert): Check for bare parameter packs in the
      	condition.
      	* decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
      	attributes of a declaration.
      	* parser.c (cp_parser_using_declaration): Tweak call to
      	check_for_bare_parameter_packs.
      	(cp_parser_base_clause): Ditto.
      	
      
      2008-01-29  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/34055
      	PR c++/34103
      	PR c++/34219
      	PR c++/34606
      	PR c++/34753
      	PR c++/34754
      	PR c++/34755
      	PR c++/34919
      	PR c++/34961
      	* g++.dg/cpp0x/vt-34219-2.C: New.
      	* g++.dg/cpp0x/pr32126.C: Tweak expected error messages.
      	* g++.dg/cpp0x/vt-34961.C: New.
      	* g++.dg/cpp0x/vt-34055.C: Tweak error messages; add new test
      	cases from the re-opened PR.
      	* g++.dg/cpp0x/vt-34753.C: New.
      	* g++.dg/cpp0x/vt-34919.C: New.
      	* g++.dg/cpp0x/vt-34754.C: New.
      	* g++.dg/cpp0x/vt-34606.C: New.
      	* g++.dg/cpp0x/vt-34219.C: New.
      	* g++.dg/cpp0x/pr32125.C: Tweak expected error messages.
      	* g++.dg/cpp0x/vt-34755.C: New.
      	* g++.dg/cpp0x/pr31438.C: Ditto.
      	* g++.dg/cpp0x/variadic81.C: Ditto.
      
      From-SVN: r131938
      Douglas Gregor committed
  13. 24 Jan, 2008 1 commit
  14. 22 Jan, 2008 1 commit
  15. 15 Jan, 2008 5 commits
    • re PR c++/34751 (ICE with pointer to member and variadic templates) · cdcae745
      2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/34751
      	* pt.c (coerce_template_parameter_pack): When substituting into
      	the type of a non-type template parameter pack. use the
      	deduced/substituted arguments.
      	* parser.c (declarator_can_be_parameter_pack): A pointer-to-member
      	can be a parameter pack with the ellipsis following it.  When we
      	have an erroneous declaration, allow it to be a parameter pack.
      	(cp_parser_template_parameter): Complain about default
      	arguments on non-type template parameter packs, and parse them
      	using the new cp_parser_default_argument.
      	(cp_parser_parameter_declaration): Complain about parameter packs
      	with default arguments. Move parsing of default arguments into a
      	new function, cp_parser_default_argument.
      	(cp_parser_default_argument): New; extracted from
      	cp_parser_parameter_declaration.
      
      2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/34751
      	* g++.dg/cpp0x/vt-34751.C: New.
      
      From-SVN: r131548
      Douglas Gregor committed
    • re PR c++/34051 (ICE in dependent_type_p with variadic templates) · 4439d02f
      2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/34051
      	PR c++/34055
      	PR c++/34102
      	PR c++/34103
      	* typeck.c (check_return_expr): If there are bare parameter packs
      	in the return value, set it to error_mark_node.
      	* tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
      	* pt.c (find_parameter_packs_r): Look at the type of
      	IDENTIFIER_NODEs (e.g., for user-defined conversions).
      	(check_for_bare_parameter_packs): Flip the result: now returns
      	TRUE when there were bare parameter packs, FALSE otherwise.
      	(push_template_decl_real): Deal with flipped result of
      	check_for_bare_parameter_packs.
      	* semantics.c (finish_cond): If there are bare parameter packs in
      	the conditional, set it to error_mark_node.
      	(finish_expr_stmt): If there are bare parameter packs in the
      	expression, set it to error_mark_node.
      	(finish_for_expr): Ditto.
      	(finish_switch_cond): If there are bare parameter packs in
      	the conditional, set it to error_mark_node.
      	(finish_mem_initializers): If there are bare parameter packs in
      	the member initializer, set it to error_mark_node.
      	(finish_member_declaration): Check the attributes of the
      	declaration for bare parameter packs, and remove the attributes if
      	any have bare parameter packs.
      	* parser.c (cp_parser_using_declaration): Check the using
      	declaration for bare parameter packs.
      	(cp_parser_base_clause): If there are bare parameter packs in a
      	base specifier, don't add it to the chain.
      
      2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/34051
      	PR c++/34055
      	PR c++/34102
      	PR c++/34103
      	* g++.dg/cpp0x/vt-34051-2.C: New.
      	* g++.dg/cpp0x/vt-34102.C: New.
      	* g++.dg/cpp0x/vt-34051.C: New.
      	* g++.dg/cpp0x/vt-34055.C: New.
      	* g++.dg/cpp0x/vt-34103.C: New.
      
      From-SVN: r131547
      Douglas Gregor committed
    • re PR c++/34314 (ICE on invalid code (with variadic templates): tree check:… · a022041e
      re PR c++/34314 (ICE on invalid code (with variadic templates): tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in template_class_depth)
      
      2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
      
             PR c++/34314
             * error.c (dump_simple_decl): Display ellipsis for template
             non-type parameter packs.
             (dump_decl): Display ellipsis for template type parameter packs.
             (dump_template_decl): Display ellipsis for template template
             parameter packs.
             * pt.c (redeclare_class_template): When redeclaring a class
             template, check for collisions between template parameters and
             template parameter packs.
      
      2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
      
             PR c++/34314
             * g++.dg/cpp0x/vt-34314.C: New.
             * g++.dg/cpp0x/variadic79.C: Fix the error message to reflect
             reality (the error message was wrong previously).
      
      From-SVN: r131546
      Douglas Gregor committed
    • re PR c++/33964 (internal compiler error: in dependent_type_p, at cp/pt.c:15319 (vararg templates)) · c095a4f8
      2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
      
             PR c++/33964
             * pt.c (process_partial_specialization): Don't mark template
             parameters that occur in non-deduced contexts.
             (struct pair_fn_data): Add include_nondeduced_p.
             (for_each_template_parm_r): Only visit non-deduced contexts if
             include_nondeduced_p is set.
             (for_each_template_parm): Added parameter include_nondeduced_p,
             which states whether template parameters found in non-deduced
             contexts should be visited.
             (uses_template_parms): Visit all template parameters, even those
             in non-deduced contexts.
      
      2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
      
             PR c++/33964
             * g++.dg/cpp0x/vt-33964.C: New.
             * g++.dg/template/partial5.C: New.
      
      From-SVN: r131544
      Douglas Gregor committed
    • re PR c++/34052 (Trouble with variadic templates as template-template parameter) · 85d85234
      2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
      
             PR c++/34052
             * pt.c (check_default_tmpl_args): Check for parameter packs that
             aren't at the end of a primary template.
             (push_template_decl_real): Remove check for parameter packs that
             aren't at the end of a primary template; that now happens in
             check_default_tmpl_args.
             * semantics.c (finish_template_template_parm): Use
             check_default_tmpl_args to check for errors in the template
             parameter list.
      
      2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
      
             PR c++/34052
             * g++.dg/cpp0x/vt-34052.C: New.
             * g++.dg/template/ttp26.C: New.
      
      From-SVN: r131543
      Douglas Gregor committed
  16. 13 Jan, 2008 1 commit
    • c-decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers instead of OPT_Wreturn_type in... · 5db2e9ca
      ChangeLog:
      
      2008-01-12  Doug Kwan  <dougkwan@google.com>
      
      	* c-decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
      	instead of OPT_Wreturn_type in warning due to ignored return type
      	qualifiers.
      	* c-opt.c (c_common_post_option): Add -Wignored-qualifiers to
      	options included in -Wextra.
      	* c.opt: New option -Wignored_qualifiers.
      	* doc/invoke.texi (Warning Options, -Wextra): Add new option
      	-Wignore_qualifiers.
      	(-Wignored-qualifiers): Document.
      	(-Wreturn-type): Remove description of functionality now handled
      	by -Wignored-qualifiers.
      
      cp/ChangeLog:
      
      2008-01-12  Doug Kwan  <dougkwan@google.com>
      
      	* decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
      	instead of OPT_Wreturn_type in warning due to ignored return type
      	qualifiers.
      	* pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
      	instead of OPT_Wreturn_type in warning due to ignored return type
      	qualifiers.
      
      testsuite/ChangeLog:
      
      2008-01-12  Doug Kwan  <dougkwan@google.com>
      
      	* gcc.dg/qual-return-1.c: Add -Wignored-qualifiers.
      	* g++.dg/warn/Wreturn-type-4.C: Replace -Wreturn-type by
      	-Wignored-qualifiers.
      
      From-SVN: r131499
      Doug Kwan committed
  17. 18 Dec, 2007 2 commits
    • re PR c++/34206 (ICE in retrieve_local_specialization) · 82390eb6
              PR c++/34206
              * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
              use template parms.
              (dependent_type_p_r): Handle the domain of an array.
      
      From-SVN: r131044
      Jason Merrill committed
    • re PR c++/32565 (ICE with specialization of variadic template) · 4cf36211
      2007-12-18  Douglas Gregor  <doug.gregor@gmail.com>
                  Jakub Jelinek  <jakub@redhat.com>
      	
      	PR c++/32565
      	PR c++/33943
      	PR c++/33965
      	* pt.c (template_template_parm_bindings_ok_p): New; verifies
      	bindings of template template parameters after all template
      	arguments have been deduced.
      	(coerce_template_parms): Don't complain when COMPLAIN doesn't
      	include tf_error.
      	(fn_type_unification): Use template_template_parm_bindings_ok_p. 
      	(unify): Deal with variadic, bound template template parameters. 
      	(get_class_bindings): Use template_template_parm_bindings_ok_p. 	
      	
      2007-12-18  Douglas Gregor  <doug.gregor@gmail.com>
      	    Jakub Jelinek  <jakub@redhat.com>
      	
      	PR c++/32565
      	PR c++/33943
      	PR c++/33965
      	* g++.dg/cpp0x/variadic86.C: New.
      	* g++.dg/cpp0x/variadic87.C: New.
      	* g++.dg/cpp0x/variadic84.C: New.
      	* g++.dg/cpp0x/variadic85.C: New.
      	* g++.dg/template/ttp25.C: New.
      	
      	
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r131041
      Douglas Gregor committed
  18. 04 Dec, 2007 2 commits
    • re PR c++/33509 (tsubst_pack_expansion assumed to return TREE_VEC) · 2f93f02c
      2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
      
             PR c++/33509
             * pt.c (tsubst_exception_specification): Handle substitutions into
             member templates, where tsubst_pack_expansion returns a
             TYPE_PACK_EXPANSION.
      
      2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
      
             PR c++/33509
             * g++.dg/cpp0x/variadic-throw.C: New.
      
      From-SVN: r130605
      Douglas Gregor committed
    • re PR c++/33091 ([c++0x] ICE using remove_reference on variadic param pack) · db60ff18
      2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
      
             PR c++/33091
             * pt.c (unify_pack_expansion): If we didn't deduce any actual
             bindings for the template parameter pack, don't try to keep the
             empty deduced arguments.
             (unify): If a parameter is a template-id whose template argument
             list contains a pack expansion that is not at the end, then we
             cannot unify against that template-id.
      
      2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
      
             PR c++/33091
             * g++.dg/cpp0x/variadic-unify.C: New.
      
      From-SVN: r130604
      Douglas Gregor committed
  19. 02 Dec, 2007 1 commit
  20. 20 Nov, 2007 1 commit
  21. 16 Nov, 2007 1 commit
  22. 13 Nov, 2007 1 commit
    • re PR c++/34054 (ICE with parameter pack in return type) · 046e4071
      	PR c++/34054
      	PR c++/34056
      	PR c++/34057
      	PR c++/34058
      	PR c++/34060
      	* pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
      	set to error_mark_node the outermost POINTER_TYPE to the pack if
      	it is seen in a POINTER_TYPE.
      	(push_template_decl_real): If check_for_bare_parameter_packs
      	fails for function return type, set the return type to
      	integer_type_node.  If check_for_bare_parameter_packs failed
      	for non-function, return error_mark_node.
      
      	* g++.dg/parse/crash36.C: Add another dg-error.
      	* g++.dg/cpp0x/pr34054.C: New test.
      	* g++.dg/cpp0x/pr34056.C: New test.
      	* g++.dg/cpp0x/pr34057.C: New test.
      	* g++.dg/cpp0x/pr34058.C: New test.
      	* g++.dg/cpp0x/pr34060.C: New test.
      
      From-SVN: r130152
      Jakub Jelinek committed
  23. 12 Nov, 2007 1 commit
    • re PR c++/8570 (line number in error message is badly placed with illegal… · b131ad7c
      re PR c++/8570 (line number in error message is badly placed with illegal template friend declaration)
      
      2007-11-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR c++/8570
      cp/
      	* pt.c (redeclare_class_template): Update error message. Use a
      	note to show the previous declaration.
      	(tsubst_friend_class): Use the location of the friend template as
      	the input location before calling redeclare_class_template.
      testsuite/
      	* g++.old-deja/g++.ns/template13.C: Update expected output.
      	* g++.old-deja/g++.pt/friend23.C: Likewise.
      	* g++.dg/warn/pr8570.C: New.
      
      From-SVN: r130092
      Manuel López-Ibáñez committed
  24. 10 Nov, 2007 1 commit
  25. 06 Nov, 2007 2 commits
    • re PR c++/31439 (ICE with variadic template and broken specialization) · 1ad8aeeb
      2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/31439
      	PR c++/32114
      	PR c++/32115
      	PR c++/32125
      	PR c++/32126
      	PR c++/32127
      	PR c++/32128
      	PR c++/32253
      	PR c++/32566
      	* typeck.c (check_return_expr): Pass address of retval to
      	check_for_bare_parameter_packs.
      	* class.c (build_base_field): Tolerate bases that have no layout
      	due to errors.
      	(end_of_base): Ditto.
      	* tree.c (canonical_type_variant): Be careful with
      	ERROR_MARK_NODE.
      	* cp-tree.h (check_for_bare_parameter_packs): Now accepts a
      	tree*.
      	* pt.c (find_parameter_pack_data): Add set_packs_to_error field,
      	which states whether parameter packs should be replaced with
      	ERROR_MARK_NODE.
      	(find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
      	possible. If set_packs_to_error is set true, replace the parameter
      	pack with ERROR_MARK_NODE. Manage our own pointer sets.
      	(uses_parameter_packs): Don't set parameter packs to
      	ERROR_MARK_NODE.
      	(check_for_bare_parameter_packs): Now takes a pointer to a tree,
      	which may be modified (if it is a parameter pack). Instructs
      	find_parameter_packs_r to replace parameter packs with
      	ERROR_MARK_NODE (so that they won't cause errors later on).
      	(process_template_parm): Pass pointer to
      	check_for_bare_parameter_packs.
      	(process_partial_specialization): Replace pack expansions before
      	the end of the template argument list with ERROR_MARK_NODE.
      	(push_template_decl_real): Pass pointer to
      	check_for_bare_parameter_packs. Replace parameter packs not at the
      	end of the template parameter list with ERROR_MARK_NODE.
      	(convert_template_argument): Be more careful about using DECL_NAME
      	on only declarations.
      	(unify): Can't unify against ERROR_MARK_NODE.
      	* semantics.c (finish_cond): Pass pointer to
      	check_for_bare_parameter_packs.
      	(finish_expr_stmt): Ditto.
      	(finish_for_expr): Ditto.
      	(finish_switch_cond): Pass pointer to
      	check_for_bare_parameter_packs, and call it before we put the
      	condition into the statement.
      	(finish_mem_initializers): Pass pointer to
      	check_for_bare_parameter_packs.
      	(finish_member_declaration): Ditto.
      	* parser.c (cp_parser_base_clause): Ditto.
      	
      2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
      
      	* testsuite/g++.dg/parser/crash36.C: Tweak expected errors.
      	* testsuite/g++.dg/cpp0x/pr31439.C: New.
      	* testsuite/g++.dg/cpp0x/pr32114.C: New.
      	* testsuite/g++.dg/cpp0x/pr32115.C: New.
      	* testsuite/g++.dg/cpp0x/pr32125.C: New.
      	* testsuite/g++.dg/cpp0x/pr32126.C: New.
      	* testsuite/g++.dg/cpp0x/pr32127.C: New.
      	* testsuite/g++.dg/cpp0x/pr32128.C: New.
      	* testsuite/g++.dg/cpp0x/pr32253.C: New.
      	* testsuite/g++.dg/cpp0x/pr32566.C: New.
      	* testsuite/g++.dg/cpp0x/pr31445.C: Tweak expected errors.
      	* testsuite/g++.dg/cpp0x/pr31438.C: Ditto.
      	* testsuite/g++.dg/cpp0x/variadic81.C: Ditto.
      	* testsuite/g++.dg/cpp0x/pr31432.C: Ditto.
      	* testsuite/g++.dg/cpp0x/pr31442.C: Ditto.
      
      From-SVN: r129928
      Douglas Gregor committed
    • re PR c++/33894 (pragma omp atomic broken) · 239371f9
      	PR c++/33894
      	* cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
      	OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
      	* pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
      	* semantics.c (finish_omp_atomic): Revert most of the
      	2007-02-05 changes, just keep the new representation of
      	OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
      
      	* testsuite/libgomp.c++/atomic-1.C: New test.
      
      From-SVN: r129919
      Jakub Jelinek committed
  26. 05 Nov, 2007 1 commit
  27. 02 Nov, 2007 2 commits
  28. 30 Oct, 2007 1 commit
    • re PR c++/31993 (ICE with template class in variadic template class) · 88b82314
      2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/31993
      	PR c++/32252
      	* pt.c (find_parameter_packs_r): Fix typo in comment.
      	(convert_template_argument): Look at the pattern of a pack
      	expansion to determine what kind of entity we're converting.
      	(coerce_template_parameter_pack): When we have coerced a non-type
      	template parameter pack, substitute into the type of that pack.
      	(tsubst_pack_expansion): When our substitution of a parameter pack
      	is a "trivial" substitution of itself, just substitute into the
      	pack expansion rather than actually expanding.
      
      2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>
      
      	PR c++/31993
      	PR c++/32252
      	* g++.dg/cpp0x/pr31993.C: New
      	* g++.dg/cpp0x/pr32252.C: New
      
      From-SVN: r129773
      Doug Gregor committed
  29. 29 Oct, 2007 1 commit
    • re PR c++/30659 (ICE in undefined template) · 8259e4f5
      cp/
      2007-10-28  Paolo Carlini  <pcarlini@suse.de>
      	    Mark Mitchell  <mark@codesourcery.com>
      
      	PR c++/30659
      	* pt.c (do_decl_instantiation): If the VAR_DECL is not a
      	class member error out and return.
      
      testsuite/
      2007-10-28  Paolo Carlini  <pcarlini@suse.de>
      	    Mark Mitchell  <mark@codesourcery.com>
      
      	PR c++/30659
      	* g++.dg/template/crash71.C: New.
      
      Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
      
      From-SVN: r129710
      Paolo Carlini committed
  30. 26 Oct, 2007 1 commit
  31. 22 Oct, 2007 1 commit