1. 18 Jun, 2009 1 commit
    • class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl. · 3600f678
              * class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
              * decl.c (finish_decl): Remove.
              (declare_global_var): Replace finish_decl with cp_finish_decl.
              (start_method): Same.
              * rtti.c (emit_tinfo_decl): Same.
              * pt.c (tsubst_expr): Same.
              (instantiate_decl): Same.
              * decl2.c (grokbitfield): Same.
              * name-lookup.c (pushdecl_top_level_1): Same.
              * cp-tree.h: Remove finish_decl.
      
      From-SVN: r148666
      Aldy Hernandez committed
  2. 16 Jun, 2009 4 commits
    • aix.h (LIBSTDCXX_STATIC): Remove -lstdc++. · a322799d
              * config/rs6000/aix.h (LIBSTDCXX_STATIC): Remove -lstdc++.
      cp/
              * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.
              (lang_specific_driver): Always allocate extra argument.
              Add LIBSTDCXX_STATIC to arglist if defined and linking
              statically.
      
      From-SVN: r148546
      David Edelsohn committed
    • Make-lang.in (cp/class.o): Depend upon gt-cp-class.h. · fb2a4237
      	* Make-lang.in (cp/class.o): Depend upon gt-cp-class.h.
      	(cp/semantics.o): Depend upon gt-cp-semantics.h.
      
      From-SVN: r148544
      Ian Lance Taylor committed
    • c-common.c (skip_evaluation): Don't define. · 7d882b83
      ./:	* c-common.c (skip_evaluation): Don't define.
      	(c_inhibit_evaluation_warnings): Define global variable.
      	(overflow_warning): Check c_inhibit_evaluation_warnings rather
      	than skip_evaluation.
      	(convert_and_check, warn_for_div_by_zero): Likewise.
      	* c-common.h (skip_evaluation): Don't declare.
      	(c_inhibit_evaluation_warnings): Declare.
      	* c-parser.c (c_parser_typeof_specifier): Set
      	c_inhibit_evaluation_warnings rather than skip_evaluation.
      	(c_parser_conditional_expression): Likewise.
      	(c_parser_binary_expression): Likewise.
      	(c_parser_sizeof_expression): Likewise.
      	(c_parser_alignof_expression): Likewise.
      	* c-typeck.c (build_indirect_ref): Check
      	c_inhibit_evaluation_warnings rather than skip_evaluation.
      	(build_conditional_expr, build_binary_op): Likewise.
      cp/:
      	* parser.c (cp_unevaluated_operand): Define global variable.
      	(cp_parser_question_colon_clause): Increment
      	c_inhibit_evaluation_warnings when evaluating an expression which
      	will never be executed.
      	(cp_parser_decltype): Increment cp_unevaluated_operand and
      	c_inhibit_evaluation_warnings, not skip_evaluation.
      	(cp_parser_sizeof_operand): Likewise.
      	(cp_parser_enclosed_template_argument_list): Save
      	cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
      	skip_evaluation.
      	* cp-tree.h (struct saved_scope): Remove skip_evaluation field.
      	Add unevaluated_operand and inhibit_evaluation_warnings fields.
      	(cp_unevaluated_operand): Declare.
      	* name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
      	and c_inhibit_evaluation_warnings rather than skip_evaluation.
      	(pop_from_top_level): Restore cp_unevaluated_operand and
      	c_inhibit_evaluation_warnings rather than skip_evaluation.
      	* class.c (build_base_path): Check cp_unevaluated_operand rather
      	than skip_evaluation.
      	* typeck.c (build_class_member_access_expr): Likewise.
      	(cp_build_binary_op): Don't warn about bad shift counts if
      	c_inhibit_evaluation_warnings is non-zero.
      	* pt.c (coerce_template_parms): Save state of
      	cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
      	skip_evaluation.
      	(tsubst_aggr_type): Likewise.
      	(tsubst_pack_expansion): Check cp_unevaluated_operand rather than
      	skip_evaluation.
      	(tsubst_copy): Likewise.
      	(tsubst): Set cp_unevaluated_operand and
      	c_inhibit_evaluation_warnings, not skip_evaluation.
      	(tsubst_copy_and_build): Likewise.
      	* call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
      	rather than skip_evaluation.
      	* decl2.c (mark_used): Likewise.
      	* semantics.c (finish_non_static_data_member): Likewise.
      	* cvt.c (cp_convert_and_check): Check
      	c_inhibit_evaluation_warnings rather than skip_evaluation.
      	* mangle.c (write_type): Set cp_unevaluated_operand rather than
      	skip_evaluation.
      testsuite/:
      	* g++.dg/warn/skip-1.C: New testcase.
      
      From-SVN: r148535
      Ian Lance Taylor committed
    • df-problems.c (df_simulate_one_insn_forwards): Fix braces in switch. · e1b7793c
      ./:	* df-problems.c (df_simulate_one_insn_forwards): Fix braces in
      	switch.
      	* gcov.c (read_count_file): Add braces around variables declared
      	before label.
      
      	* c.opt (Wjump-misses-init): New warning.
      	* c-opts.c (c_common_handle_option): Set warn_jump_misses_init for
      	-Wall and -Wc++-compat if not already set.
      	(c_common_post_options): Clear warn_jump_misses_init if it was not
      	set.
      	* c-decl.c (struct c_binding): Change type field to a union with
      	new label field.  Make it the first field in the struct.  Update
      	references to type to use u.type instead.
      	(struct c_spot_bindings): Define.
      	(struct c_goto_bindings): Define.
      	(c_goto_bindings_p): Define, along with VECs.
      	(struct c_label_vars): Define.
      	(struct c_scope): Add has_label_bindings field.
      	(bind_label, set_spot_bindings): New static functions.
      	(decl_jump_unsafe, update_spot_bindings): New static functions.
      	(update_label_decls): New static function.
      	(pop_scope): Call update_label_decls.  Don't call c_end_vm_scope.
      	Update binding u.label field to shadowed field.
      	(c_binding_start_stmt_expr): New function.
      	(c_binding_end_stmt_expr): New function.
      	(pushdecl): Don't call c_begin_vm_scope.
      	(make_label): Add defining and p_label_vars parameters.  Change
      	all callers.
      	(lookup_label): Correct test for whether a label has not yet been
      	defined.  Call bind_label rather than bind.
      	(warn_about_goto): New static function.
      	(lookup_label_for_goto): New function.
      	(declare_label): Call bind_label rather than bind.
      	(check_earlier_gotos): New static function.
      	(define_label): Don't give errors about jumping into statement
      	expressions or scopes of variably modified types.  Call
      	set_spot_bindings and check_earlier_gotos.  Call bind_label
      	instead of bind.  Don't set label_context_stack_se or
      	label_context_stack_vm.
      	(c_get_switch_bindings): New function.
      	(c_release_switch_bindings): New function.
      	(c_check_switch_jump_warnings): New function.
      	(start_function): Don't set label_context_stack_se or
      	label_context_stack_vm.
      	(finish_function): Likewise.
      	* c-typeck.c (label_context_stack_se): Don't define.
      	(label_context_stack_vm): Don't define.
      	(c_finish_goto_label): Call lookup_label_for_goto rather than
      	lookup_label.  Don't give errors about jumping into a statement
      	expression or the scope of a variably modified type.  Don't set
      	label_context_stack_se or label_context_stack_vm.
      	(struct c_switch): Remove blocked_stmt_expr and blocked_vm
      	fields.  Add bindings field.
      	(c_start_case): Don't set deleted fields.  Set bindings field.
      	(do_case): Rework order of tests.  Don't check blocked_stmt_expr
      	or blocked_vm.  Call c_check_switch_jump_warnings.
      	(c_finish_case): Don't test blocked_stmt_expr field.  Call
      	c_release_switch_bindings.
      	(c_begin_stmt_expr): Don't increment blocked_stmt_expr in
      	c_switch_stack.  Don't walk label_context_stack_se labels.  Don't
      	set label_context_stack_se.  Call c_bindings_start_stmt_expr.
      	(c_finish_stmt_expr): Don't decrement blocked_stmt_expr in
      	c_switch_stack.  Don't walk label_context_stack_se labels.  Don't
      	set label_context_stack_se.  Call c_bindings_end_stmt_expr.
      	(c_begin_vm_scope, c_end_vm_scope): Don't define.
      	* c-tree.h (C_DECL_UNJUMPABLE_STMT_EXPR): Don't define.
      	(C_DECL_UNDEFINABLE_STMT_EXPR): Don't define.
      	(C_DECL_UNJUMPABLE_VM): Don't define.
      	(C_DECL_UNDEFINABLE_VM): Don't define.
      	(struct c_label_list): Don't define.
      	(struct c_label_context_se): Don't define.
      	(struct c_label_context_vm): Don't define.
      	(struct c_spot_bindings): Declare.
      	(c_bindings_start_stmt_expr): Declare.
      	(c_bindings_end_stmt_expr): Declare.
      	(lookup_label_for_goto): Declare.
      	(c_get_switch_bindings, c_release_switch_bindings): Declare.
      	(c_check_switch_jump_warnings): Declare.
      	(label_context_stack_se, label_context_stack_vm): Don't declare.
      	(c_finish_goto_label): Update declaration.
      	(c_begin_vm_scope, c_end_vm_scope): Don't declare.
      	* doc/invoke.texi (Option Summary): Mention -Wjump-misses-init.
      	(Warning Options): Document -Wjump-misses-init.
      cp/:
      	* parser.c (cp_parser_direct_declarator): Add braces around
      	variables declared before label.
      objc/:
      	* objc-act.c (objc_start_function): Don't set
      	label_context_stack_se or label_context_stack_vm.
      testsuite/:
      	* gcc.dg/Wjump-misses-init-1.c: New testcase.
      	* gcc.dg/Wjump-misses-init-2.c: New testcase.
      	* gcc.dg/c99-vla-jump-5.c: Adjust expected error messages.
      	Recognize new notes.
      	* gcc.dg/stmt-expr-label-2.c: Likewise.
      	* gcc.dg/c99-vla-jump-1.c: Recognize new notes.  Fix column
      	numbers.
      	* gcc.dg/c99-vla-jump-2.c: Recognize new notes.
      	* gcc.dg/c99-vla-jump-3.c: Recognize new notes.
      	* gcc.dg/c99-vla-jump-4.c: Likewise.
      	* gcc.dg/stmt-expr-label-1.c: Likewise.
      	* gcc.dg/stmt-expr-label-3.c: Likewise.
      	* gcc.dg/vla-8.c: Likewise.  Move error message to different
      	line.
      
      From-SVN: r148512
      Ian Lance Taylor committed
  3. 15 Jun, 2009 1 commit
    • cgraphunit.c (cgraph_function_versioning,save_inline_function_body): Use… · fc26fae3
      cgraphunit.c (cgraph_function_versioning,save_inline_function_body): Use DECL_COMDAT_GROUP instead of DECL_ONE_ONLY.
      
      2009-06-15  Rafael Avila de Espindola  <espindola@google.com>
      
      	* cgraphunit.c (cgraph_function_versioning,save_inline_function_body):
      	Use DECL_COMDAT_GROUP instead of DECL_ONE_ONLY.
      	* cgraph.c (cgraph_create_virtual_clone): Use DECL_COMDAT_GROUP.
      	* config/i386/i386.c (ix86_file_end): Compute DECL_COMDAT_GROUP.
      	* dwarf2asm.c(dw2_force_const_mem): Update call to make_decl_one_only.
      	* langhooks-def.h (lhd_comdat_group, LANG_HOOKS_COMDAT_GROUP): Remove.
      	(LANG_HOOKS_DECLS): Remove LANG_HOOKS_COMDAT_GROUP.
      	* langhooks.c (lhd_comdat_group): Remove.
      	* langhooks.h (lang_hooks_for_decls): Remove comdat_group.
      	* tree.h (DECL_COMDAT_GROUP): New.
      	(DECL_ONE_ONLY): Use DECL_COMDAT_GROUP.
      	(tree_decl_with_vis): Add comdat_group. Remove one_only.
      	(make_decl_one_only): Change signature.
      	* varasm.c (get_emutls_init_templ_addr, emutls_decl): Update call to
      	make_decl_one_only.
      	(make_decl_one_only): Change signature.
      	(default_elf_asm_named_section): Use DECL_COMDAT_GROUP.
      
      2009-06-15  Rafael Avila de Espindola  <espindola@google.com>
      
      	* cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Remove.
      	* cp-tree.h (cxx_comdat_group): Change signature.
      	* decl.c (duplicate_decls): Use DECL_COMDAT_GROUP.
      	(cxx_comdat_group): Change signature.
      	* decl2.c (comdat_linkage, maybe_make_one_only): Update call to
      	make_decl_one_only.
      	(constrain_visibility, get_guard): Use DECL_COMDAT_GROUP.
      	* method.c (use_thunk): Update call to make_decl_one_only.
      	* optimize.c (maybe_clone_body): Use DECL_COMDAT_GROUP
      
      2009-06-15  Rafael Avila de Espindola  <espindola@google.com>
      
      	* g++.dg/abi/mangle11.C: Update warning line.
      	* g++.dg/abi/mangle12.C: Update warning line.
      	* g++.dg/abi/mangle17.C: Update warning line.
      	* g++.dg/abi/mangle20-2.C: Update warning line.
      
      From-SVN: r148492
      Rafael Avila de Espindola committed
  4. 12 Jun, 2009 1 commit
    • java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt. · c2255bc4
      gcc/java/
      	* java-gimplify.c (java_gimplify_block): New argument to
      	build_empty_stmt.
      	* expr.c (force_evaluation_order): Same.
      	* typeck.c: Add location to build_decl or PUSH_FIELD calls.
      	* class.c: Same.
      	* decl.c: Same.
      	* jcf-parse.c: Same.
      	* constants.c: Same.
      	* resource.c: Same.
      	* except.c: Same.
      	* builtins.c: Same.
      	* expr.c: Same.
      	* java-tree.h (PUSH_FIELD): Add location field.
      gcc/objc/
      	* objc-act.c (finish_var_decl): Pass location to finish_decl.
      	(objc_get_parm_info): Same.
      	(get_super_receiver): Same.
      	* objc-act.c (objc_build_component_ref): Pass location to
      	build_compound_ref.
      	(build_module_initializer_routine): Pass location to
      	c_end_compound_stmt.
      	(objc_generate_static_init_call): Pass location to build_stmt.
      	(build_typed_selector_reference): New location argument.
      	(build_selector_reference): Same.
      	(objc_substitute_decl): Pass location to build_array_ref.
      	(next_sjlj_build_try_catch_finally): Pass location to build_stmt.
      	(objc_begin_catch_clause): Same.
      	(objc_finish_try_stmt): Same.
      	(objc_finish_catch_clause): Pass location to c_end_compound_stmt.
      	(objc_build_throw_stmt): New argument.
      	(generate_shared_structures): Pass location to build_c_cast.
      	(objc_build_message_expr): Use local location.
      	(objc_finish_message_expr): Use input_location.
      	(build_objc_method_call): New argument.
      	(objc_build_selector_expr): Same.
      	(get_super_receiver): Pass location to build_c_cast,
      	build_modify_expr, build_compound_expr.
      	* objc-act.c: Add location to all calls to start_struct, build_decl,
      	finish_struct.
      gcc/
      	* tree-pretty-print.c (dump_generic_node): Dump column numbers.
      	* gimple-pretty-print.c (dump_gimple_stmt): Same.
      	* gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs
      	created.
      	* c-parser.c (c_parser_binary_expression): Use current column while
      	building binary operations.
      	* common.opt (fshow-column): Enable by default.
      	* tree-vrp.c (check_array_ref): Use warning_at.
      	(check_array_bounds): Use location from call back if expr has no
      	location.
      	* tree.h: Add location argument to maybe_fold_*.
      	* tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*.
      	(maybe_fold_offset_to_array_ref): Add location argument and use it.
      	(maybe_fold_offset_to_component_ref): Same.
      	(maybe_fold_offset_to_reference): Same.
      	(maybe_fold_offset_to_address): Same.
      	(maybe_fold_stmt_indirect): Same.
      	(maybe_fold_stmt_addition): Same.
      	(fold_stmt_r): Pass location to maybe_fold_*.
      	(fold_gimple_assign): Same.
      	* c-tree.h: Add location argument to finish_decl,
      	default_function_array_conversion, store_init_value.
      	* c-decl.c (define_label): Use error_at.
      	(c_make_fname_decl): Pass location to finish_decl.
      	(finish_decl): New location argument.
      	(build_compound_literal): Pass location to store_init_value.
      	(grokdeclarator): Pass location to finish_decl.
      	(grokfield): Same.
      	* c-typeck.c (array_to_pointer_conversion): New location argument.
      	(function_to_pointer_conversion): Same.
      	(default_function_array_conversion): Same.
      	(parser_build_unary_op): Pass location to overflow_warning.
      	(parser_build_binary_op): Same.  Use warning_at.
      	(build_unary_op): Pass location to array_to_pointer_conversion.
      	(build_c_cast): Pass location to digest_init.
      	(build_modify_expr): New location argument.
      	(convert_for_assignment): Same.
      	(store_init_value): Same.
      	(digest_init): Same.
      	(output_init_element): Pass location to digest_init and
      	array_to_pointer_conversion.
      	(c_finish_return): Pass location to convert_for_assignment.
      	* gimplify.c (gimplify_conversion): Pass location to
      	maybe_fold_offset_to_address.
      	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location
      	to maybe_fold_stmt_addition.
      	* c-omp.c (c_finish_omp_atomic): Pass new location to
      	build_modify_expr.
      	(c_finish_omp_for): Same.
      	* c-common.c (overflow_warning): New argument.
      	* c-common.h: New argument to build_modify_expr, overflow_warning.
      	* c-parser.c (c_parser_declaration_or_fndef): Pass location to
      	finish_decl.
      	(c_parser_initializer): Pass location to
      	default_function_array_conversion.
      	(c_parser_initelt): Same.
      	(c_parser_initval): Same.
      	(c_parser_asm_operands): Same.
      	(c_parser_expr_no_commas): Same.  Pass location to build_modify_expr.
      	(c_parser_conditional_expression): Same.
      	(c_parser_binary_expression): Add location info to stack.  Use it.
      	(c_parser_unary_expression): Pass location to
      	default_function_array_conversion, parser_build_unary_op,
      	build_indirect_ref, c_parser_postfix_expression_after_primary.
      	(c_parser_postfix_expression_after_primary): New location argument.
      	Use it.
      	(c_parser_expression_conv): Pass location to
      	default_function_array_conversion.
      	(c_parser_expr_list): Same.
      	(c_parser_omp_atomic): Same.
      	(c_parser_omp_for_loop): Same.
      	* c-tree.h: (struct c_declarator): Add comment to id_loc.
      	(build_array_declarator): New argument.
      	* c-decl.c (build_array_declarator): Add location argument.
      	(grokdeclarator): Set id_loc for cdk_array.
      	* c-parser.c (c_parser_direct_declarator_inner): Pass location to
      	build_array_declarator.
      	* tree.c (build_omp_clause): Add location argument.
      	* tree.h (OMP_CLAUSE_HAS_LOCATION): New macro.
      	(OMP_CLAUSE_LOCATION): New macro.
      	(struct tree_omp_clause): Add location field.
      	(build_omp_clause): Add argument.
      	* testsuite/gcc.dg/gomp/for-1.c: Fix column.
      	* cp/pt.c (tsubst_omp_for_iterator): Pass location to
      	build_omp_clause.
      	* cp/parser.c (cp_parser_omp_var_list_no_open): Same.
      	(cp_parser_omp_clause_collapse): Same.
      	(cp_parser_omp_clause_default): Same.
      	(cp_parser_omp_clause_if): Same.
      	(cp_parser_omp_clause_nowait): Same.
      	(cp_parser_omp_clause_num_threads): Same.
      	(cp_parser_omp_clause_ordered): Same.
      	(cp_parser_omp_clause_schedule): Same.
      	(cp_parser_omp_clause_untied): Same.
      	(cp_parser_omp_for_loop): Same.
      	(cp_parser_omp_parallel): Pass location to c_split_parallel_clauses.
      	* c-tree.h (c_start_case): Add location argument.
      	(c_process_expr_stmt): Same.
      	(c_finish_goto_*): Same.
      	* tree-parloops.c (initialize_reductions): Pass location to
      	build_omp_clause.
      	(create_parallel_loop): Same.
      	* fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same.
      	(gfc_trans_omp_reduction_list): Same.
      	(gfc_trans_omp_clauses): Same.
      	(gfc_trans_omp_do): Same.
      	* c-typeck.c (c_finish_goto_label): Same.
      	(c_finish_goto_ptr): New location argument.
      	(c_start_case): Same.
      	(emit_side_effect_warnings): Same.
      	(c_process_expr_stmt): Same.
      	(c_finish_stmt_expr): Same.
      	(c_finish_omp_clauses): Use error_at instead of error.
      	* gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to
      	build_omp_clause.
      	* c-omp.c (c_split_parallel_clauses): New location argument.
      	* tree-nested.c (convert_nonlocal_reference_stmt): Pass location
      	to build_omp_clause.
      	(convert_local_reference_stmt): Same.
      	(convert_gimple_call): Same.
      	* c-common.h (c_split_parallel_clauses): New argument.
      	* c-parser.c (c_parser_statement_after_labels): Pass location to
      	c_finish_goto_label.
      	(c_parser_switch_statement): Pass location to c_start_case.
      	(c_parser_for_statement): Pass location to c_finish_expr_stmt,
      	and c_process_expr_stmt.
      	(c_parser_omp_variable_list): Add location argument.
      	(c_parser_omp_clause_collapse): Pass location to
      	build_omp_clause.
      	(c_parser_omp_clause_default): Same.
      	(c_parser_omp_clause_if): Same.
      	(c_parser_omp_clause_num_threads): Same.
      	(-c_parser_omp_clause_ordered): Same.
      	(c_parser_omp_clause_reduction): Pass location to
      	c_parser_omp_variable_list.
      	(c_parser_omp_clause_schedule): Pass location to build_omp_clause.
      	(c_parser_omp_clause_untied): Same.
      	(c_parser_omp_for_loop): Pass location to c_process_expr_stmt.
      	(c_parser_omp_parallel): Pass location to
      	c_split_parallel_clauses.
      	* c-tree.h (check_for_loop_decls, undeclared_variable,
      	build_component_ref, build_array_ref, build_external_ref,
      	c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op,
      	build_conditional_expr, build_compound_expr, c_cast_expr,
      	build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr,
      	c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New
      	argument.
      	* c-semantics.c (build_stmt): Same.
      	(build_case_label): Same.
      	* c-decl.c (c_finish_incomplete_decl): Pass location on down.
      	(undeclared_variable): New argument.
      	(make_label): Same.
      	(lookup_label): Pass location on down.
      	(define_label): Same.
      	(finish_decl): Same.
      	(build_compound_literal): Same.
      	(finish_struct): Same.
      	(finish_function): Do not set location here.
      	(check_for_loop_decls): New argument.
      	* tree.c (save_expr): Set location.
      	(build_empty_stmt): New argument.
      	* tree.h (build_empty_stmt): New argument to build_empty_stmt.
      	(CAN_HAVE_LOCATION_P): Make sure we have a non empty node.
      	* builtins.c (gimplify_va_arg_expr): Use locations.
      	(expand_builtin_sync_operation): Same.
      	* c-typeck.c (build_component_ref): New argument.
      	(build_array_ref): Same.
      	(build_external_ref): Same.
      	(c_expr_sizeof_expr): Same.
      	(c_expr_sizeof_type): Same.
      	(parser_build_unary_op): Same.
      	(build_conditional_expr): Same.
      	(build_compound_expr): Pass location on down.
      	(build_compound_expr): New argument.
      	(build_c_cast): Same.
      	(c_cast_expr): Same.
      	(build_asm_expr): Same.
      	(c_finish_return): Same.
      	(c_process_expr_stmt): Pass location on down.
      	(c_finish_stmt_expr): New argument.
      	(push_clenaup): Same.
      	(c_finish_omp_parallel): Same.
      	(c_finish_omp_task): Same.
      	* gimplify.c (gimplify_call_expr): Pass location on down.
      	* c-omp.c (c_finish_omp_master): New argument.
      	(c_finish_omp_critical): Same.
      	(c_finish_omp_ordered): Same.
      	(c_finish_omp_barrier): Same.
      	(-c_finish_omp_taskwait): Same.
      	(c_finish_omp_atomic): Same.
      	(c_finish_omp_flush): Same.
      	* tree-inline.c (copy_tree_body_r): Pass location on down.
      	(inline_forbidden_p): Remove use of input_location.
      	* c-gimplify.c (c_build_bind_expr): New argument.
      	* c-common.c (c_common_truthvalue_conversion): Pass location on down.
      	(c_sizeof_or_alignof_type): New argument.
      	(c_alignof_expr): Same.
      	(build_va_arg): Same.
      	(c_add_case_label): Same.
      	* c-common.h (c_sizeof_or_alignof_type, c_alignof_expr,
      	c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label,
      	c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt,
      	c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered,
      	c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush,
      	c_finish_omp_taskwait, c_finish_omp_for, c_split_parallel_clauses):
      	New argument.
      	* stub-objc.c (objc_build_selector_expr): Same.
      	(objc_build_throw_stmt): Same.
      	* c-parser.c (c_parser_declaration_or_fndef): Pass location on down.
      	(c_parser_initelt): Same.
      	(c_parser_compound_statement): Same.
      	(c_parser_compound_statement_nostart): Same.
      	(c_parser_label): Same.
      	(c_parser_statement_after_labels): Same.
      	(c_parser_if_body): Same.
      	(c_parser_else_body): Same.
      	(c_parser_if_statement): Same.
      	(c_parser_switch_statement): Same.
      	(c_parser_while_statement): Same.
      	(c_parser_do_statement): Same.
      	(c_parser_for_statement): Same.
      	(c_parser_asm_statement): Same.
      	(c_parser_conditional_expression): Same.
      	(c_parser_binary_expression): Same.
      	(c_parser_cast_expression): Same.
      	(c_parser_unary_expression): Same.
      	(c_parser_sizeof_expression): Same.
      	(c_parser_alignof_expression): Same.
      	(c_parser_postfix_expression): Same.
      	(c_parser_expression): Same.
      	(c_parser_objc_receiver): Same.
      	(c_parser_omp_variable_list): Same.
      	(c_parser_omp_structured_block): Same.
      	(c_parser_omp_atomic): New argument.
      	(c_parser_omp_barrier): Same.
      	(c_parser_omp_critical): Same.
      	(c_parser_omp_flush): Pass location on down.
      	(c_parser_omp_for_loop): New argument.
      	(c_parser_omp_for): Same.
      	(c_parser_omp_master): Same.
      	(c_parser_omp_ordered): Same.
      	(c_parser_omp_sections_scope): Same.
      	(c_parser_omp_sections): Same.
      	(c_parser_omp_parallel): Same.
      	(c_parser_omp_single): Same.
      	(c_parser_omp_task): Same.
      	(c_parser_omp_taskwait): Pass location on down.
      	(c_parser_omp_construct): Same.
      	(c_parser_omp_threadprivate): Same.
      	* dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h,
      	builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c,
      	tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c,
      	c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c,
      	c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c,
      	emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c,
      	rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h,
      	tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c,
      	config/i386/i386.c, stmt.c:
      	Add location argument to the following function definitions and/or
      	function calls: build_decl, objcp_start_struct, objcp_finish_struct,
      	start_struct, finish_struct, PUSH_FIELD, create_artificial_label,
      	cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl,
      	build_compound_literal, parser_xref_tag, resolve_overloaded_builtin,
      	do_case, c_finish_bc_stmt, build_compound_literal,
      	build_function_call.
      	* c-decl.c (build_compound_literal): Add location argument.
      	Make all diagnostic calls use location.
      	(start_struct): Same.
      	(finish_struct): Same.
      	(start_enum): Same.
      	(build_enumerator): Same.
      	(start_function): Same.
      	(grokdeclarator): Make all diagnostic calls use location.
      	(store_parm_decls_oldstyle): Same.
      	* c-typeck.c (build_function_call): Add location argument.
      	Make all diagnostic calls use location.
      	(do_case): Same.
      	(c_finish_bc_stmt): Same.
      	* tree-nested.c (get_trampoline_type): Add argument.
      	Pass location to build_decl.
      	(lookup_tramp_for_decl): Pass location to get_trampoline_type.
      	* rtl.h (RTL_LOCATION): New.
      	* c-common.c (c_add_case_label): Add location argument.
      	Make all diagnostic calls use location.
      	* c-common.h: Add location argument to make_fname_decl, do_case,
      	c_add_case_label, build_function_call, resolve_overloaded_builtin.
      	* c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc.
      	Set it appropriately for every case.  Pass enum_loc to start_enum
      	call.  Pass value_loc first to build_enumerator.  Pass enum_loc to
      	parser_xref_tag.
      	(c_parser_struct_or_union_specifier): Save location.  Use it for
      	start_struct, finish_struct, and parser_xref_tag.
      gcc/testsuite/
      	* gcc.dg/old-style-prom-3.c: Add column info.
      	* gcc.dg/overflow-warn-1.c
      	* gcc.dg/gomp/pr27415.c
      	* gcc.dg/gomp/for-1.c: Same.
      	* gcc.dg/enum-compat-1.c: Same.
      	* gcc.dg/c99-tag-3.c: Same.
      	* gcc.dg/Wredundant-decls-2.c: Same.
      	* gcc.dg/func-ptr-conv-1.c: Same.
      	* gcc.dg/asm-wide-1.c: Same.
      	* gcc.dg/nofixed-point-2.c: Same.
      	* gcc.dg/cpp/line3.c: Same.
      	* gcc.dg/array-10.c: Same.
      	* gcc.dg/c99-vla-jump-1.c: Same.
      	* gcc.dg/pr20368-1.c: Same.
      	* gcc.dg/Wshadow-3.c: Same.
      	* gcc.dg/c90-const-expr-8.c: Same.
      	* gcc.dg/label-decl-2.c: Same.
      	* gcc.dg/dremf-type-compat-2.c: Same.
      	* gcc.dg/c90-const-expr-5.c: Same.
      	* gcc.dg/builtins-30.c: Same.
      	* gcc.dg/Warray-bounds.c: Same.
      	* gcc.dg/Wcxx-compat-2.c: Same.
      	* gcc.dg/tree-ssa/col-1.c: Same.
      	* gcc.dg/old-style-prom-2.c: Same.
      	* gcc.dg/cast-function-1.c: Same.
      	* gcc.dg/pr15698-1.c: Same.
      	* gcc.dg/dremf-type-compat-3.c: Same.
      	* gcc.dg/vla-8.c: Same.
      	* gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct
      	line.
      	* gcc.dg/label-decl-2.c: Move label diagnostic to correct line.
      	* gcc.dg/old-style-prom-3.c: Check for error on the correct line.
      	* gcc.dg/enum-compat-1.c: Same.
      	* gcc.dg/dremf-type-compat-2.c: Same.
      	* gcc.dg/old-style-prom-2.c: Same.
      	* gcc.dg/pr15698-1.c: Same.
      	* gcc.dg/pr20368-1.c: Same.
      	* gcc.dg/dremf-type-compat-3.c: Same.
      	* gcc.dg/builtins-30.c: Same.  Test for columns.
      gcc/objcp/
      	* objcp-decl.h (c_end_compound_stmt): New argument.
      	* objcp-decl.c (objcp_start_struct): Add argument.
      	(objcp_finish_struct): Same.
      gcc/cp/
      	* typeck.c (cp_build_binary_op): Pass location to overflow_warning.
      	(build_modify_expr): New arg.
      	* semantics.c (finish_unary_op_expr): Pass location to
      	overflow_warning.
      	(handle_omp_for_class_iterator): Pass location to build_modify_expr.
      	* typeck.c (cxx_sizeof_or_alignof_type): Pass location to
      	c_sizeof_or_alignof_type.
      	(build_array_ref): New argument.
      	(build_compound_expr): Same.
      	(build_const_cast): Same.
      	(build_ptrmemfunc): Pass location to build_c_cast.
      	* init.c (avoid_placement_new_aliasing): Pass location to
      	build_stmt.
      	(build_vec_delete_1): Pass location to cp_build_modify_expr,
      	build_compound_expr.
      	* class.c (build_vtbl_ref_1): Pass location to build_array_ref.
      	* decl.c (poplevel): Pass location to c_build_bind_expr.
      	(finish_case_label): Pass location to build_case_label.
      	(finish_constructor_body): Same.
      	(finish_destructor_body): Pass location to build_stmt.
      	(cxx_maybe_build_cleanup): Same, but to build_compound_expr.
      	* call.c (build_new_op): Pass location to build_array_ref.
      	(build_x_va_arg): Pass location to build_va_arg.
      	* except.c (expand_end_catch_block): Pass location to
      	build_stmt.
      	* cp-tree.h (build_array_ref): New argument.
      	(build_compound_expr): Same.
      	(build_c_cast): Same.
      	* cp-gimplify.c (gimplify_if_stmt): Pass location on down.
      	(gimplify_switch_stmt): Same.
      	* typeck2.c (split_nonconstant_init_1): Same.
      	* pt.c (tsubst_copy): Same.
      	* semantics.c (add_decl_expr): Same.
      	(do_poplevel): Same.
      	(push_cleanup): Same.
      	(finish_goto_stmt): Same.
      	(finish_expr_stmt): Same.
      	(begin_if_stmt): Same.
      	(begin_while_stmt): Same.
      	(begin_do_stmt): Same.
      	(finish_return_stmt): Same.
      	(begin_for_stmt): Same.
      	(finish_break_stmt): Same.
      	(finish_continue_stmt): Same.
      	(begin_switch_stmt): Same.
      	(begin_try_block): Same.
      	(begin_handler): Same.
      	(finish_asm_stmt): Same.
      	(finish_label_stmt): Same.
      	(finish_stmt_expr_expr): Same.
      	(finalize_nrv_r): Same.
      	(finish_omp_atomic): Same.
      	* name-lookup.c (do_using_directive): Same.
      	* decl2.c (grok_array_decl): Same.
      	* parser.c (cp_parser_cast_expression): Same.
      	(cp_parser_selection_statement): Same.
      	(cp_parser_implicitly_scoped_statement): Same.
      	(cp_parser_objc_selector_expression): Same.
      	(cp_parser_objc_synchronized_statement): Same.
      	(cp_parser_objc_throw_statement): Same.
      	(cp_parser_omp_critical): Same.
      	(cp_parser_omp_master): Same.
      	* typeck.c (build_function_call): Add location argument.
      	* init.c: Add location argument to all build_decl calls.
      	* class.c: Same.
      	* method.c: Same.
      	* rtti.c: Same.
      	* tree.c: Same.
      	* pt.c: Same.
      	* semantics.c: Same.
      	* lex.c: Same.
      	* decl2.c: Same.
      	* cp-gimplify.c: Same.
      	* decl.c: Same.
      	(cp_make_fname_decl): Add location argument.  Pass location ot
      	build_decl.
      	(finish_case_label): Same.
      	* cp-tree.h (finish_case_label): Add location argument.
      	* parser.c (cp_parser_label_for_labeled_statement): Pass location to
      	finish_case_label.
      gcc/fortran/
      	* trans-array.c (gfc_trans_allocate_array_storage): Pass
      	location on down.
      	(gfc_trans_array_constructor_value): Same.
      	(gfc_trans_scalarized_loop_end): Same.
      	(gfc_conv_ss_startstride): Same.
      	(gfc_trans_g77_array): Same.
      	(gfc_trans_dummy_array_bias): Same.
      	(gfc_conv_array_parameter): Same.
      	(structure_alloc_comps): Same.
      	* trans-expr.c (gfc_conv_function_call): Same.
      	(fill_with_spaces): Same.
      	(gfc_trans_string_copy): Same.
      	(gfc_trans_scalar_assign): Same.
      	* trans-stmt.c (gfc_trans_goto): Same.
      	(gfc_trans_if_1): Same.
      	(gfc_trans_simple_do): Same.
      	(gfc_trans_do): Same.
      	(gfc_trans_do_while): Same.
      	(gfc_trans_logical_select): Same.
      	(gfc_trans_select): Same.
      	(gfc_trans_forall_loop): Same.
      	(gfc_trans_nested_forall_loop): Same.
      	(generate_loop_for_temp_to_lhs): Same.
      	(generate_loop_for_rhs_to_temp): Same.
      	(gfc_trans_forall_1): Same.
      	(gfc_trans_where_assign): Same.
      	(gfc_trans_where_3): Same.
      	(gfc_trans_allocate): Same.
      	* trans.c (gfc_finish_block): Same.
      	(gfc_trans_runtime_check): Same.
      	(gfc_call_malloc): Same.
      	(gfc_allocate_with_status): Same.
      	(gfc_call_free): Same.
      	(gfc_deallocate_with_status): Same.
      	(gfc_call_realloc): Same.
      	(gfc_trans_code): Same.
      	* trans-decl.c (gfc_init_default_dt): Same.
      	(gfc_generate_constructors): Same.
      	* trans-io.c (gfc_trans_io_runtime_check): Same.
      	* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
      	(gfc_conv_intrinsic_fdate): Same.
      	(gfc_conv_intrinsic_ttynam): Same.
      	(gfc_conv_intrinsic_minmax): Same.
      	(gfc_conv_intrinsic_minmax_char): Same.
      	(gfc_conv_intrinsic_anyall): Same.
      	(gfc_conv_intrinsic_count): Same.
      	(gfc_conv_intrinsic_arith): Same.
      	(gfc_conv_intrinsic_minmaxloc): Same.
      	(gfc_conv_intrinsic_minmaxval): Same.
      	(gfc_conv_intrinsic_rrspacing): Same.
      	(gfc_conv_intrinsic_array_transfer): Same.
      	(gfc_conv_intrinsic_trim): Same.
      	(gfc_conv_intrinsic_repeat): Same.
      
      From-SVN: r148442
      Aldy Hernandez committed
  5. 09 Jun, 2009 2 commits
  6. 08 Jun, 2009 3 commits
    • re PR c++/40373 (ICE with invalid destructor call) · b792a33c
      	PR c++/40373
      	* call.c (check_dtor_name): Return false even if
      	get_type_value (name) is error_mark_node.
      
      	* g++.dg/template/dtor7.C: New test.
      
      From-SVN: r148282
      Jakub Jelinek committed
    • re PR c++/40370 (ICE with invalid array bound in template class) · 85a988d1
      	PR c++/40370
      	PR c++/40372
      	* parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
      	on error_mark_node.  Check for VLAs outside of function context
      	before check whether to wrap bounds into a NOP_EXPR with
      	TREE_SIDE_EFFECTS.
      
      	* g++.dg/template/error41.C: New test.
      	* g++.dg/template/error42.C: New test.
      
      From-SVN: r148278
      Jakub Jelinek committed
    • common.opt (fcompare-debug=, [...]): New. · 2153915d
      gcc/ChangeLog:
      * common.opt (fcompare-debug=, fcompare-debug-second): New.
      (fdump-final-insns=, gtoggle): New.
      * doc/invoke.texi: Document them.
      * final.c (rest_of_clean_state): Dump final insn stream.
      * gcc.c (invoke_as): Hook in -fcompare-debug.
      (static_spec_functions): Add compare-debug-dump-opt,
      compare-debug-self-opt and compare-debug-auxbase-opt.
      (compare_debug, compare_debug_second, compare_debug_opt): New.
      (switches_debug_check, n_switches_debug_check): New.
      (debug_auxbase_opt, debug_check_temp_file): New.
      (process_command): Handle -fno-compare-debug, -fcompare-debug and
      -fcompare-debug=*.
      (do_self_spec): Handle arguments after switches.
      (do_spec_1): Add .gk extension to temp file basenames for compare.
      (check_live_switch): Take SWITCH_IGNORE into account, and earlier.
      (cc1_options): Use it instead of normal auxbase computation for
      the second compare-debug compilation.
      (compare_files): New.
      (main): Set up and implement compare debug mode.
      (compare_debug_dump_opt_spec_function): New.
      (compare_debug_self_opt_spec_function): New.
      (compare_debug_auxbase_opt_spec_function): New.
      * toplev.c (process_options): Handle flag_gtoggle,
      flag_dump_final_insns.
      * coverage.c (coverage_begin_output): Don't overwrite .gcno file
      during -fcompare-debug-second compilation.
      gcc/cp/ChangeLog:
      * repo.c (get_base_filename): Use aux_base_name rather than
      alternate temporary file during second compare debug compilation.
      (finish_repo): Skip during -fcompare-debug-second.
      gcc/ada/ChangeLog:
      * lib-writ.adb (flag_compare_debug): Import.
      (Write_ALI): Skip during -fcompare-debug-second.
      gcc/fortran/ChangeLog:
      * options.c (gfc_post_options): Disable dump_parse_tree
      during -fcompare-debug-second.
      gcc/objc/ChangeLog:
      * objc-act.c (objc_init): Skip print_struct_values during
      -fcompare-debug-second.
      
      From-SVN: r148271
      Alexandre Oliva committed
  7. 07 Jun, 2009 1 commit
    • extend.texi (Attribute Syntax): Document that C++ labels on empty statements can… · 5bca4e80
      extend.texi (Attribute Syntax): Document that C++ labels on empty statements can now have attributes.
      
      ./:	* doc/extend.texi (Attribute Syntax): Document that C++ labels on
      	empty statements can now have attributes.
      cp/:
      	* parser.c (cp_parser_label_for_labeled_statement): Support
      	attribute on labels if immediately followed by semicolon.
      	* semantics.c (finish_label_stmt): Return new label.
      	* pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
      testsuite/:
      	* gcc.dg/Wunused-label-1.c: New test case.
      	* g++.dg/warn/Wunused-label-1.C: New test case.
      	* g++.dg/warn/Wunused-label-2.C: New test case.
      	* g++.dg/warn/Wunused-label-3.C: New test case.
      
      From-SVN: r148242
      Ian Lance Taylor committed
  8. 03 Jun, 2009 2 commits
    • ansidecl.h (EXPORTED_CONST): Define. · 6bc7bc14
      include/:
      	* ansidecl.h (EXPORTED_CONST): Define.
      gcc/:
      	* dummy-checksum.c (executable_checksum): Use EXPORTED_CONST.
      	* genattrtab.c (write_length_unit_log): Likewise.
      	* genchecksum.c (dosum): Likewise.
      	* gengtype.c (write_rtx_next): Likewise.
      	(finish_root_table, write_roots): Likewise.
      	* gimple.c (gimple_ops_offset_): Likewise.
      	* tree-nomudflap.c (gt_ggc_r_gt_tree_mudflap_h): Likewise.
      	* config/arc/arc.c (arc_attribute_table): Likewise.
      	* config/arm/arm.c (arm_attribute_table): Likewise.
      	* config/avr/avr.c (avr_attribute_table): Likewise.
      	* config/crx/crx.c (crx_attribute_table): Likewise.
      	* config/m32r/m32r.c (m32r_attribute_table): Likewise.
      	* config/m68hc11/m68hc11.c (m68hc11_attribute_table): Likewise.
      	* config/mcore/mcore.c (mcore_attribute_table): Likewise.
      	* config/rs6000/rs6000.c (rs6000_attribute_table): Likewise.
      	* config/sh/sh.c (sh_attribute_table): Likewise.
      	* config/sparc/sparc.c (sparc_attribute_table): Likewise.
      	* config/spu/spu.c (spu_attribute_table): Likewise.
      	* config/v850/v850.c (v850_attribute_table): Likewise.
      
      	* config/alpha/alpha.c (vms_attribute_table): Make static.
      	* config/bfin/bfin.c (bfin_attribute_table): Likewise.
      	* config/h8300/h8300.c (h8300_attribute_table): Likewise.
      	* config/mips/mips.c (mips_attribute_table): Likewise.
      
      	* Makefile.in (dummy-checksum.o): Depend upon $(CONFIG_H) and
      	$(SYSTEM_H).
      	(cc1-checksum.o): Likewise.
      gcc/cp/:
      	* Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
      	$(SYSTEM_H).
      gcc/objc/:
      	* Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and
      	$(SYSTEM_H).
      gcc/objcp/:
      	* Make-lang.in (cc1objplus-checksum.o): Depend upon $(CONFIG_H)
      	and $(SYSTEM_H).
      
      From-SVN: r148146
      Ian Lance Taylor committed
  9. 02 Jun, 2009 3 commits
  10. 01 Jun, 2009 1 commit
    • diagnostic.c (diagnostic_build_prefix): Always print columns. · e74fe492
      gcc/
      	* diagnostic.c (diagnostic_build_prefix): Always print columns.
      	(diagnostic_report_current_module): Print columns.
      	* common.opt (flag_show_column): Enable by default.
      gcc/testsuite/
      	* lib/gcc-dg.exp (dg-bogus): Override dg-bogus.
      	(process-message): Expect column numbers.
      	* gcc.dg/va-arg-2.c: Use line 0 to indicate no column.
      	* gcc.dg/pch/counter-2.c: Same.
      	* gcc.dg/pch/valid-2.c: Same.
      	* gcc.dg/pch/warn-1.c: Same.
      	* gcc.dg/pch/valid-1.c: Same.
      	* gcc.dg/cpp/include2a.c: Handle lack of columns.
      	* gcc.dg/cpp/syshdr.c: Same.
      	* gcc.dg/cpp/19940712-1.c: Same.
      	* gcc.dg/cpp/missing-header-1.c: Same.
      	* gcc.dg/cpp/unc4.c: Remove -fno-show-column.
      	* gcc.dg/cpp/tr-warn3.c: Same.
      	* gcc.dg/cpp/pr29612-2.c: Same.
      	* gcc.dg/cpp/tr-warn4.c: Same.
      	* gcc.dg/cpp/Wtrigraphs.c: Same.
      	* gcc.dg/cpp/poison.c: Same.
      	* gcc.dg/cpp/arith-3.c: Same.
      	* gcc.dg/cpp/sysmac2.c: Same.
      	* gcc.dg/cpp/cpp.exp: Same.
      	* gcc.dg/cpp/tr-warn5.c: Same.
      	* gcc.dg/cpp/include2.c: Same.
      	* gcc.dg/cpp/Wmissingdirs.c: Same.
      	* gcc.dg/cpp/Wmissingdirs.c: Same.
      	* gcc.dg/cpp/tr-warn6.c: Same.
      	* gcc.dg/cpp/Wtrigraphs-2.c: Same.
      	* gcc.dg/cpp/macspace1.c: Same.
      	* gcc.dg/cpp/escape-2.c: Same.
      	* gcc.dg/cpp/assert2.c: Same.
      	* gcc.dg/cpp/undef2.c: Same.
      	* gcc.dg/cpp/macspace2.c: Same.
      	* gcc.dg/cpp/tr-warn1.c: Same.
      	* gcc.dg/cpp/extratokens2.c: Same.
      	* gcc.dg/cpp/strify2.c: Same.
      	* gcc.dg/cpp/Wsignprom.c: Same.
      	* gcc.dg/cpp/redef2.c: Same.
      	* gcc.dg/cpp/trad/trad.exp: Same.
      	* gcc.dg/cpp/arith-1.c: Same.
      	* gcc.dg/cpp/extratokens.c: Same.
      	* gcc.dg/cpp/if-mpar.c: Same.
      gcc/cp/
      	* error.c (print_instantiation_partial_context): Print column
      	numbers.
      libcpp/
      	* include/line-map.h (LAST_SOURCE_COLUMN): New.
      
      From-SVN: r148052
      Aldy Hernandez committed
  11. 29 May, 2009 1 commit
    • builtins.c (validate_gimple_arglist): Don't use va_arg with enum type. · 72b5577d
      ./:	* builtins.c (validate_gimple_arglist): Don't use va_arg with
      	enum type.
      	* calls.c (emit_library_call_value_1): Likewise.
      
      	* c-typeck.c (c_build_va_arg): New function.
      	* c-tree.h (c_build_va_arg): Declare.
      	* c-parser.c (c_parser_postfix_expression): Call c_build_va_arg
      	instead of build_va_arg.
      cp/:
      	* error.c (cp_printer): Don't use va_arg with enum type.
      testsuite/:
      	* gcc.dg/Wcxx-compat-11.c: New testcase.
      
      From-SVN: r147989
      Ian Lance Taylor committed
  12. 28 May, 2009 1 commit
    • Fix for PR c++/PR39754 · cd41d410
      gcc/cp/ChangeLog:
          PR c++/39754
          * cp-tree.h (canonical_type_variant): Remove this function declaration.
          (strip_typedefs): New function declaration.
          * tree.c (strip_typedefs): New function definition.
          (canonical_type_variant): Remove function definition.
          * cvt.c (convert_from_reference): No need to use
          canonical_type_variant.
          * typeck.c (cp_build_indirect_ref): Likewise.
          * error.c (dump_template_bindings): Use strip_typedefs instead of
          canonical_type_variant.
          * pt.c (convert_template_argument, unify): Likewise.
          * mangle.c (canonicalize_for_substitution): Don't use
          canonical_type_variant.
      
      gcc/testsuite/ChangeLog:
          PR c++/39754
          * g++.dg/template/canon-type-1.C: New test.
          * g++.dg/template/canon-type-2.C: Likewise.
          * g++.dg/template/canon-type-3.C: Likewise.
          * g++.dg/template/canon-type-4.C: Likewise.
          * g++.dg/template/canon-type-5.C: Likewise.
          * g++.dg/template/canon-type-6.C: Likewise.
          * g++.dg/template/canon-type-7.C: Likewise.
      
      From-SVN: r147951
      Dodji Seketeli committed
  13. 27 May, 2009 2 commits
    • call.c (implicit_conversion): Handle conversion from initializer-list to scalar. · c5adc427
      	* call.c (implicit_conversion): Handle conversion from
      	initializer-list to scalar.
      	(convert_like_real): Likewise.  Avoid crashing on list
      	initialization with bad conversions.
      	(can_convert): Use LOOKUP_EXPLICIT.
      	(can_convert_arg_bad): Add flags parm.
      	* cp-tree.h: Adjust.
      	* typeck.c (convert_for_assignment): Pass flags.
      
      From-SVN: r147933
      Jason Merrill committed
    • Makefile.in (LINKER, [...]): Define. · c607156f
      ./:	* Makefile.in (LINKER, LINKER_FLAGS): Define.
      	(LINKER_FOR_BUILD, BUILD_LINKERFLAGS): Define.
      	(ALL_LINKERFLAGS): Define.
      	(xgcc$(exeext)): Change $(COMPILER) to $(LINKER).
      	(cpp$(exeext), cc1-dummy$(exeext), cc1$(exeext)): Likewise.
      	(collect2$(exeext), mips-tfile, mips-tdump): Likewise.
      	(gcov$(exeext), gcov-dump$(exeext)): Likewise.
      	(build/gen%$(build_exeext)): Change $(COMPILER_FOR_BUILD) to
      	$(LINKER_FOR_BUILD).
      	(build/gcov-iov$(build_exeext)): Likewise.
      cp/:
      	* Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
      	(cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
      fortran/:
      	* Make-lang.in (gfortran$(exeext)): Change $(COMPILER) to
      	$(LINKER).
      	(f951$(exeext)): Likewise.
      java/:
      	* Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
      	$(LINKER).
      	(jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
      objc/:
      	* Make-lang.in (cc1obj-dummy$(exeext)): Change $(COMPILER) to
      	$(LINKER).
      	(cc1obj$(exeext)): Likewise.
      objcp/:
      	* Make-lang.in (cc1objplus-dummy$(exeext)): Change $(COMPILER) to
      	$(LINKER).
      	(cc1objplus$(exeext)): Likewise.
      
      From-SVN: r147927
      Ian Lance Taylor committed
  14. 26 May, 2009 2 commits
    • Makefile.in (COMPILER, [...]): Define. · 7980bfb8
      ./:	* Makefile.in (COMPILER, COMPILER_FLAGS): Define.
      	(COMPILER_FOR_BUILD, BUILD_COMPILERFLAGS): Define.
      	(ALL_COMPILERFLAGS): Define.
      	(.c.o, xgcc$(exeext), cpp$(exeext)): Use $(COMPILER).
      	(cc1-dummy$(exeext), cc1$(exeext)): Likewise.
      	(collect2$(exeext), collect2.o): Likewise.
      	(c-opts.o, c-cppbuiltin.o, c-pch.o, gcc.o, gccspec.o): Likewise.
      	(gcc-options.o, version.o, prefix.o, toplev.o): Likewise.
      	($(out_object_file), mips-tfile, mips-tdump): Likewise.
      	(libbackend.o, intl.o, cppdefault.o): Likewise.
      	(gcov$(exeext), gcov-dump$(exeext)): Likewise.
      	(build/%.o): Use $(COMPILER_FOR_BUILD).
      	(build/gen%$(build_exeext)): Likewise.
      	(build/gcov-iov$(build_exeext)): LIkewise.
      	* config/t-darwin (darwin.o): Use $(COMPILER).
      	(darwin-c.o, darwin-f.o, darwin-driver.o): Likewise.
      	* config/t-sol2 (sol2-c.o): Likewise.
      	(sol2.o): Likewise.
      	* config/t-vxworks (vxworks.o): Likewise.
      	* config/x-darwin (host-darwin.o): Likewise.
      	* config/x-hpux (host-hpux.o): Likewise.
      	* config/x-linux (host-linux.o): Likewise.
      	* config/x-solaris (host-solaris.o): Likewise.
      	* config/alpha/x-alpha (driver-alpha.o): Likewise.
      	* config/arm/t-arm (arm-c.o): Likewise.
      	* config/arm/t-pe (pe.o): Likewise.
      	* config/arm/t-wince-pe (pe.o): Likewise.
      	* config/i386/t-cygming (winnt.o): Likewise.
      	(winnt-cxx.o, winnt-stubs.o, msformat-c.o): Likewise.
      	* config/i386/t-cygwin (cygwin1.o): Likewise.
      	(cygwin2.o): Likewise.
      	* config/i386/t-i386 (i386-c.o): Likewise.
      	* config/i386/t-interix (winnt.o): Likewise.
      	* config/i386/t-netware (netware.o): Likewise.
      	* config/i386/t-nwld (nwld.o): Likewise.
      	* config/i386/x-darwin (host-i386-darwin.o): Likewise.
      	* config/i386/x-i386 (driver-i386.o): Likewise.
      	* config/i386/x-cygwin (host-cygwin.o): Likewise.
      	* config/i386/x-mingw32 (host-mingw32.o): Likewise.
      	* config/ia64/t-ia64 (ia64-c.o): Likewise.
      	* config/m32c/t-m32c (m32c-pragma.o): Likewise.
      	* config/mips/x-native (driver-native.o): Likewise.
      	* config/rs6000/t-rs6000 (rs6000-c.o): Likewise.
      	* config/rs6000/x-darwin (host-ppc-darwin.o): Likewise.
      	* config/rs6000/x-darwin64 (host-ppc64-darwin.o): Likewise.
      	* config/rs6000/x-rs6000 (driver-rs6000.o): Likewise.
      	* config/score/t-score-elf (score7.o): Likewise.
      	(score3.o): Likewise.
      	* config/sh/t-sh (sh-c.o): Likewise.
      	* config/sh/t-symbian (sh-c.o): Likewise.
      	(symbian.o): Likewise.
      	* config/spu/t-spu-elf (spu-c.o): Likewise.
      	* config/v850/t-v850 (v850-c.o): Likewise.
      	* config/v850/t-v850e (v850-c.o): Likewise.
      ada/:
      	* gcc-interface/Makefile.in (COMPILER): Define.
      	(COMPILER_FLAGS, ALL_COMPILERFLAGS): Define.
      	(.c.o, cio.o, init.o, initialize.o, targext.o): Use $(COMPILER).
      	(seh_init.o, tracebak.o): Likewise.
      	* gcc-interface/Make-lang.in (ada/targext.o): Likewise.
      	(ada/cio.o, ada/init.o, ada/initialize.o, ada/raise.o): Likewise.
      	(ada/tracebak.o, ada/cuintp.o, ada/decl.o, ada/misc.o): Likewise.
      	(ada/targtyps.o, ada/trans.o, ada/utils.o): Likewise.
      	(ada/utils2.o): Likewise.
      cp/:
      	* Make-lang.in (g++spec.o): Use $(COMPILER).
      	(g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
      	(cc1plus$(exeext)): Likewise.
      fortran/:
      	* Make-lang.in (gfortranspec.o): Use $(COMPILER).
      	(gfortran$(exeext), f951$(exeext), fortran/cpp.o): Likewise.
      java/:
      	* Make-lang.in (jvspec.o): Use $(COMPILER).
      	($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
      	(jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
      objc/:
      	* Make-lang.in (cc1obj-dummy$(exeext)): Use $(COMPILER).
      	(cc1obj$(exeext)): Likewise.
      objcp/:
      	* Make-lang.in (cc1objplus-dummy$(exeext)): Use $(COMPILER).
      	(cc1objplus$(exeext), objcp/objcp-act.o): Likwise.
      
      From-SVN: r147873
      Ian Lance Taylor committed
    • re PR c++/40007 (specialization causes access problem in primary template) · 2eb25c98
      Fix PR c++/40007
      
          gcc/cp/ChangeLog:
          	PR c++/40007
          	* cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
          	(TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
          	(get_types_needing_access_check): Declare new entry point.
          	* pt.c (append_type_to_template_for_access_check_1,
          	get_types_needing_access_check): New functions.
          	(perform_typedefs_access_check): Accept FUNCTION_DECLs and
          	RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
          	get_types_needing_access_check, no more
          	MEMBER_TYPES_NEEDING_ACCESS_CHECK.
          	(instantiate_class_template): Set input_location to the source
          	location of the most specialized template definition.
          	Perform access check using the RECORD_TYPE of the template, not its
          	associated most generic TEMPLATE_DECL.
          	(append_type_to_template_for_access_check): Augment function
          	comments. Use the new get_types_needing_access_check, not
          	MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
          	append_type_to_template_for_access_check_1 subroutine.
      
          gcc/testsuite/ChangeLog:
          	PR c++/40007
          	* g++.dg/template/typedef18.C: New test.
          	* g++.dg/template/typedef19.C: Likewise.
          	* g++.dg/template/typedef20.C: Likewise.
          	* g++.dg/template/access11.C: Adjust.
      
      From-SVN: r147866
      Dodji Seketeli committed
  15. 25 May, 2009 1 commit
    • re PR c++/38064 ([c++0x] operator== doesn't work for enum classes) · 550a799d
      	PR c++/38064
      	* typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
      	arithmetic comparisons.
      	(cp_common_type): Handle scoped enums.
      
      	* call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
      	(add_builtin_candidate, add_builtin_candidates): Likewise.
      	(convert_like_real): Likewise.
      	* class.c (check_bitfield_decl): Likewise.
      	* decl.c (check_static_variable_definition): Likewise.
      	(compute_array_index_type): Likewise.
      	* decl2.c (grokbitfield): Likewise.
      	* init.c (build_new_1): Likewise.
      	* pt.c (convert_nontype_argument): Likewise.
      	(current_instantiation): Likewise.
      	* tree.c (pod_type_p): Likewise.
      	* typeck.c (build_static_cast_1): Likewise.
      	(build_reinterpret_cast_1): Likewise.
      
      From-SVN: r147854
      Jason Merrill committed
  16. 22 May, 2009 2 commits
    • re PR tree-optimization/38964 (TBAA side-effects of C++ new still missing) · 4d7a65ea
      2009-05-22  Richard Guenther  <rguenther@suse.de>
      
      	PR middle-end/38964
      	* alias.c (write_dependence_p): Do not use TBAA for answering
      	anti-dependence or output-dependence.
      	* tree-ssa-structalias.c (set_uids_in_ptset): Remove TBAA pruning
      	code.
      	(emit_pointer_definition): Remove.
      	(emit_alias_warning): Likewise.
      	(find_what_var_points_to): Remove TBAA pruning code.
      	(find_what_p_points_to): Likewise.  Do not warn about strict-aliasing
      	violations.
      	(compute_points_to_sets): Remove code computing the set of
      	dereferenced pointers.
      	* tree-data-ref.c (dr_may_alias_p): Properly use the split
      	oracle for querying anti and output dependencies.
      	* tree-ssa-alias.c (refs_may_alias_p_1): Add argument specifying
      	if TBAA may be applied.
      	(refs_anti_dependent_p): New function.
      	(refs_output_dependent_p): Likewise.
      	* tree-ssa-alias.h (refs_anti_dependent_p): Declare.
      	(refs_output_dependent_p): Likewise.
      
      	* doc/tree-ssa.texi (Memory model): New section.
      
      	testsuite/
      	* g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: XFAIL.
      	* gcc.dg/Wstrict-aliasing-converted-assigned.c: Likewise.
      	* gcc.dg/Wstrict-aliasing-float-ptr-int-obj.c: Likewise.
      
      	* doc/c-tree.texi (CHANGE_DYNAMIC_TYPE_EXPR): Remove.
      	* doc/gimple.texi (GIMPLE_CHANGE_DYNAMIC_TYPE): Remove.
      
      	* cfgexpand.c (expand_gimple_basic_block): Do not handle
      	GIMPLE_CHANGE_DYNAMIC_TYPE or CHANGE_DYNAMIC_TYPE_EXPR.
      	* expr.c (expand_expr_real_1): Likewise.
      	* gimple-low.c (lower_stmt): Likewise.
      	* gimple-pretty-print.c (dump_gimple_stmt): Likewise.
      	(dump_gimple_cdt): Remove.
      	* gimple.c (gss_for_code): Do not handle GIMPLE_CHANGE_DYNAMIC_TYPE.
      	(gimple_size): Likewise.
      	(walk_gimple_op): Likewise.
      	(is_gimple_stmt): Likewise.
      	(walk_stmt_load_store_addr_ops): Likewise.
      	(gimple_build_cdt): Remove.
      	* gimple.def (GIMPLE_CHANGE_DYNAMIC_TYPE): Remove.
      	* gimple.h (gimple_cdt_new_type): Remove.
      	(gimple_cdt_new_type_ptr): Likewise.
      	(gimple_cdt_set_new_type): Likewise.
      	(gimple_cdt_location): Likewise.
      	(gimple_cdt_location_ptr): Likewise.
      	(gimple_cdt_set_location): Likewise.
      	* gimplify.c (gimplify_expr): Do not handle CHANGE_DYNAMIC_TYPE_EXPR.
      	* tree-cfg.c (remove_useless_stmts_1): Do not handle
      	GIMPLE_CHANGE_DYNAMIC_TYPE.
      	(verify_types_in_gimple_stmt): Likewise.
      	* tree-inline.c (estimate_num_insns): Likewise.
      	(expand_call_inline): Do not copy DECL_NO_TBAA_P.
      	(copy_decl_to_var): Likewise.
      	(copy_result_decl_to_var): Likewise.
      	* tree-pretty-print.c (dump_generic_node): Do not handle
      	CHANGE_DYNAMIC_TYPE_EXPR.
      	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
      	* tree-ssa-operands.c (get_expr_operands): Likewise.
      	* tree-ssa-structalias.c (struct variable_info): Remove
      	no_tbaa_pruning member.
      	(new_var_info): Do not set it based on DECL_NO_TBAA_P.
      	(unify_nodes): Do not copy it.
      	(find_func_aliases): Do not handle GIMPLE_CHANGE_DYNAMIC_TYPE.
      	(dump_solution_for_var): Do not dump no_tbaa_pruning state.
      	(set_uids_in_ptset): Do not check it.
      	(find_what_var_points_to): Likewise.
      	(compute_tbaa_pruning): Remove.
      	(compute_points_to_sets): Do not call it.
      	* tree.c (walk_tree_1): Do not handle CHANGE_DYNAMIC_TYPE_EXPR.
      	* tree.def (CHANGE_DYNAMIC_TYPE_EXPR): Remove.
      	* tree.h (CHANGE_DYNAMIC_TYPE_NEW_TYPE): Remove.
      	(CHANGE_DYNAMIC_TYPE_LOCATION): Likewise.
      	(DECL_NO_TBAA_P): Likewise.
      	(struct tree_decl_common): Move no_tbaa_flag to unused flags section.
      	* omp-low.c (copy_var_decl): Do not copy DECL_NO_TBAA_P.
      	(expand_omp_atomic_pipeline): Do not set it.
      	* print-tree.c (print_node): Do not dump it.
      	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Remove
      	redundant check.
      
      	cp/
      	* init.c (avoid_placement_new_aliasing): Remove.
      	(build_new_1): Do not call it.
      
      From-SVN: r147805
      Richard Guenther committed
    • tree.c (handle_dll_attribute): Mark dllexport'd inlines as non-external. · fe2978fb
      	gcc/
      	* tree.c (handle_dll_attribute): Mark dllexport'd inlines as
      	non-external.
      
      	gcc/cp
      	* decl2.c (decl_needed_p): Consider dllexport'd functions needed.
      	* semantics.c (expand_or_defer_fn): Similarly.
      
      	gcc/testsuite/
      	* gcc.dg/dll-6.c: New test.
      	* gcc.dg/dll-6a.c: Likewise.
      	* gcc.dg/dll-7.c: Likewise.
      	* gcc.dg/dll-7a.c: Likewise.
      	* g++.dg/ext/dllexport2.C: Likewise.
      	* g++.dg/ext/dllexport2a.cc: Likewise.
      
      From-SVN: r147799
      Mark Mitchell committed
  17. 21 May, 2009 2 commits
    • tree.c (build_tree_list_vec_stat): New function. · c166b898
      ./:	* tree.c (build_tree_list_vec_stat): New function.
      	(ctor_to_vec): New function.
      	(build_nt_call_vec): New function.
      	(build_call_array): Change args to be a const pointer.
      	(build_call_vec): New function.
      	* tree.h (build_nt_call_vec): Declare.
      	(build_tree_list_vec_stat): Declare.
      	(build_tree_list_vec): Define.
      	(build_call_array): Update declaration.
      	(build_call_vec): Declare.
      	(ctor_to_vec): Declare.
      	* c-common.c (tree_vector_cache): New static variable.
      	(make_tree_vector): New function.
      	(release_tree_vector): New function.
      	(make_tree_vector_single): New function.
      	(make_tree_vector_copy): New function.
      	* c-common.h (tree_vector_cache, make_tree_vector): Declare.
      	(make_tree_vector_single, make_tree_vector_copy): Declare.
      	* c-parser.c (cached_expr_list_1, cached_expr_list_2): Remove.
      	(c_parser_expr_list): Don't manage cache here, instead call
      	make_tree_vector.
      	(c_parser_release_expr_list): Remove static function.
      	(c_parser_vec_to_tree_list): Remove static function.
      	(c_parser_attributes): Call build_tree_list_vec instead of
      	c_parser_vec_to_tree_list.  Call release_tree_vector instead of
      	c_parser_release_expr_list.
      	(c_parser_postfix_expression_after_primary): Likewise.
      	(c_parser_objc_keywordexpr): Likewise.
      cp/:
      	* parser.c (cp_parser_postfix_expression): Change args to a vec.
      	Release it when done.
      	(tree_vector): Define typedef.  Define VEC functions.
      	(cp_parser_parenthesized_expression_list): Change return type to
      	vec.  Change all callers.
      	(cp_parser_new_expression): Change placement and initializer to
      	vecs.  Release them when done.
      	(cp_parser_new_placement): Change return type to vec.  Change all
      	callers.
      	(cp_parser_new_initializer): Likewise.
      	* typeck.c (build_function_call_vec): Just call
      	cp_build_function_call_vec.
      	(cp_build_function_call): Just build a vec and call
      	cp_build_function_call_vec.
      	(cp_build_function_call_vec): New function based on old
      	cp_build_function_call.
      	(convert_arguments): Remove nargs and argarray parameters.  Change
      	values to a vec.  Change caller.
      	(build_x_compound_expr_from_vec): New function.
      	(cp_build_modify_expr): Build vec to pass to
      	build_special_member_call.
      	* call.c (struct z_candidate): Add first_arg field.  Change args
      	field to vec.
      	(convert_class_to_reference): Handle first argument separately.
      	(add_candidate): Add first_arg parameter.  Change args parameter
      	to vec.  Change all callers.
      	(add_function_candidate, add_conv_candidate): Likewise.
      	(add_template_candidate_real, add_template_candidate): Likewise.
      	(add_template_conv_candidate): Likewise.
      	(build_user_type_conversion_1): Handle first argument separately.
      	(resolve_args): Change return type and parameter type to vecs.
      	Change all callers.
      	(perform_overload_resolution): Change args parameter to vec.
      	Change all callers.
      	(build_new_function_call, build_operator_new_call): Likewise.
      	(add_candidates): Likewise.
      	(build_op_call): New globally visible function, built from and
      	replacing static function build_object_call.
      	(build_new_op): Don't handle CALL_EXPR.  Build vec, not tree_list,
      	of arguments.
      	(build_op_delete_call): Build vec to pass to
      	cp_build_function_call_vec.
      	(build_temp): Build vec to pass to build_special_member_call.
      	(convert_like_real): Likewise.
      	(perform_direct_initialization_if_possible): Likewise.
      	(build_over_call): Handle first_arg field.  Use build_call_array
      	rather than build_call_list.
      	(build_special_member_call): Change args parameter to vec.  Change
      	all callers.
      	(build_new_method_call): Likewise.
      	* init.c (expand_default_init): Change parms to vec.
      	(build_raw_new_expr): Change placement and init to vecs.  Change
      	all callers.
      	(build_new_1, build_new): Likewise.
      	* class.c (resolve_address_of_overloaded_function): Build array to
      	pass to fn_type_unification.
      	* pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
      	build_new.  For CALL_EXPR create a vec rather than a tree_list;
      	expand a pack if necessary.
      	(fn_type_unification): Change args parameter to const tree *.  Add
      	nargs parameter.  Change all callers.
      	(type_unification_real): Likewise.
      	(unify): Build array to pass to type_unification_real.
      	(get_bindings): Build array to pass to fn_type_unification.
      	(any_type_dependent_arguments_p): Change args parameter to a vec.
      	Change all callers.
      	(make_args_non_dependent): Renamed from build_non_dependent_args.
      	Change return type to void.  Change parameter type to vec.  Change
      	all callers.
      	(do_auto_deduction): Pass an array to type_unification_real.
      	* semantics.c (perform_koenig_lookup): Change args to vec.  Change
      	all callers.
      	(finish_call_expr): Change args to vec.  Change all callers.  Call
      	build_op_call instead of passing CALL_EXPR to build_new_op.
      	(cxx_omp_create_clause_info): Allocate vec to pass to
      	build_special_member_call.
      	* decl2.c (build_offset_ref_call_from_tree): Change args parameter
      	to vec.  Change all callers.
      	* name-lookup.c (lookup_function_nonclass): Likewise.
      	(struct arg_lookup): Change args to vec.
      	(arg_assoc_namespace): Handle args as a vec.
      	(arg_assoc_args_vec): New static function.
      	(lookup_arg_dependent): Change args parameter to vec.  Change all
      	callers.
      	* method.c (do_build_assign_ref): Allocate vec to pass to
      	build_special_member_call.
      	* except.c (build_throw): Likewise.
      	* typeck2.c (build_functional_cast): Likewise.
      	* cvt.c (ocp_convert): Likewise.
      	* tree.c (build_min_non_dep_call_vec): Change last parameter to
      	vec.  Change all callers.
      	* cp-tree.h: Update declarations.
      	* name-lookup.h: Update declarations.
      objc/:
      	* objc-act.c (objc_generate_cxx_ctor_or_dtor): Pass NULL rather
      	than NULL_TREE to build_special_member_call.
      
      From-SVN: r147759
      Ian Lance Taylor committed
    • tm.texi (Misc): Document TARGET_INVALID_PARAMETER_TYPE... · 40449a90
      2009-05-20  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gcc/
      	* doc/tm.texi (Misc): Document TARGET_INVALID_PARAMETER_TYPE,
      	TARGET_INVALID_RETURN_TYPE, TARGET_PROMOTED_TYPE, and
      	TARGET_CONVERT_TO_TYPE.
      	* hooks.c (hook_tree_const_tree_null): Define.
      	* hooks.h (hook_tree_const_tree_null): Declare.
      	* target.h (struct gcc_target):  Add invalid_parameter_type,
      	invalid_return_type, promoted_type, and convert_to_type fields.
      	* target-def.h: (TARGET_INVALID_PARAMETER_TYPE): Define.
      	(TARGET_INVALID_RETURN_TYPE): Define.
      	(TARGET_PROMOTED_TYPE): Define.
      	(TARGET_CONVERT_TO_TYPE): Define.
      	(TARGET_INITIALIZER): Update for new fields.
      	* c-decl.c (grokdeclarator): Check targetm.invalid_return_type.
      	(grokparms): Check targetm.invalid_parameter_type.
      	* c-typeck.c (default_conversion): Check targetm.promoted_type.
      	* c-convert.c (convert): Check targetm.convert_to_type.
      
      	gcc/cp/
      	* typeck.c (default_conversion): Check targetm.promoted_type.
      	* decl.c (grokdeclarator): Check targetm.invalid_return_type.
      	(grokparms): Check targetm.invalid_parameter_type.
      	* cvt.c (ocp_convert): Check targetm.convert_to_type.
      	(build_expr_type_conversion): Check targetm.promoted_type.
      
      From-SVN: r147758
      Sandra Loosemore committed
  18. 19 May, 2009 1 commit
    • c-typeck.c (build_binary_op): Allow % on integal vectors. · 5cfd5d9b
      2009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
      
              * c-typeck.c (build_binary_op): Allow % on integal vectors.
              * doc/extend.texi (Vector Extension): Document that % is allowed too.
      
      009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
      
              * typeck.c (build_binary_op): Allow % on integal vectors.
      
      2009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
      
              * gcc.dg/vector-4.c: New testcase.
              * gcc.dg/simd-1b.c: % is now allowed for integer vectors.
              * g++.dg/ext/vector16.C: New testcase.
      
      From-SVN: r147722
      Andrew Pinski committed
  19. 18 May, 2009 1 commit
    • Implement explicit conversions ops as specified in N2437. · e57d93c6
      	* decl.c (grokdeclarator): Handle explicit conversion ops.
      	(check_initializer): Pass flags to store_init_value.
      	* decl2.c (maybe_emit_vtables): Likewise.
      	* init.c (expand_aggr_init_1): Likewise.
      	* call.c (convert_class_to_reference): Take flags parm,
      	check DECL_NONCONVERTING_P.
      	(build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
      	(add_builtin_candidates): Simplify getting type of conversion.
      	(build_object_call): Likewise.  Check DECL_NONCONVERTING_P.
      	(implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
      	(reference_binding): Take flags parm.  Direct-initialize copy parm.
      	(add_function_candidate): Direct-initialize the copy parm.
      	(add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
      	(build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
      	(conditional_conversion): Likewise.
      	(convert_like_real): Only complain about DECL_NONCONVERTING_P
      	constructors.
      	(perform_implicit_conversion_flags): Add flags parm to
      	perform_implicit_conversion.  Improve diagnostics.
      	* cp-tree.h (LOOKUP_IMPLICIT): New macro.
      	(LOOKUP_COPY_PARM): New bit macro.
      	* cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
      	* typeck.c (convert_for_assignment): Take flags parm, pass it to
      	perform_implicit_conversion_flags.
      	(cp_build_modify_expr): Pass flags to convert_for_assignment.
      	(convert_for_initialization): Likewise.
      	* typeck2.c (store_init_value): Take flags parm, pass to
      	digest_init_flags.
      	(digest_init_flags): Add flags parm to digest_init.
      	(digest_init_r): Take flags parm, pass to convert_for_initialization.
      	(process_init_constructor_array): Pass it.
      	(process_init_constructor_record): Likewise.
      	(process_init_constructor_union): Likewise.
      
      From-SVN: r147677
      Jason Merrill committed
  20. 17 May, 2009 2 commits
    • re PR c++/40139 (ICE on invalid use of destructor) · 7e361ae6
      	PR c++/40139
      	* pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
      	with a dependent type.  Actually look up the destructor.
      	* semantics.c (finish_id_expression): Fix logic.
      	(finish_qualified_id_expr): Don't try to use 'this' if we aren't in
      	a function.
      	* typeck.c (build_x_unary_op): Diagnose taking the address of a
      	constructor or destructor.
      	* tree.c (get_first_fn): Handle OFFSET_REF.
      
      From-SVN: r147638
      Jason Merrill committed
    • tree.c (cxx_printable_name_internal): Allow consecutive translated and… · 8fa6fa79
      tree.c (cxx_printable_name_internal): Allow consecutive translated and untranslated cached copies of the name of the...
      
      cp:
      	* tree.c (cxx_printable_name_internal): Allow consecutive
      	translated and untranslated cached copies of the name of the
      	current function.
      
      testsuite:
      	* g++.dg/warn/translate-ice-1.C: New test.
      
      From-SVN: r147636
      Joseph Myers committed
  21. 16 May, 2009 1 commit
    • alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry. · 7e5487a2
      gcc/ChangeLog:
      	* alias.c (struct alias_set_entry_d): Rename from struct
      	alias_set_entry.  Change all uses.
      	* except.c (struct call_site_record_d): Rename from struct
      	call_site_record.  Change all uses.
      	* except.h (struct eh_region_d): Rename from struct eh_region.
      	Change all uses.
      	* gcse.c (struct hash_table_d): Rename from struct hash_table.
      	Change all uses.
      	* graphite.c (struct ivtype_map_elt_d): Rename fromstruct
      	ivtype_map_elt.  Change all uses.
      	(struct rename_map_elt_d): Rename fromstruct rename_map_elt.
      	Change all uses.
      	(struct ifsese_d): Rename fromstruct ifsese.  Change all uses.
      	* graphite.h (struct name_tree_d): Rename from struct name_tree.
      	Change all uses.
      	(struct sese_d): Rename from struct sese.  Change all uses.
      	* omega.h (struct eqn_d): Rename from struct eqn.  Change all
      	uses.
      	(struct omega_pb_d): Rename from struct omega_pb.  Change all
      	uses.
      	* optabs.h (struct optab_d): Rename from struct optab.  Change all
      	uses.
      	(struct convert_optab_d): Rename from struct convert_optab.
      	Change all uses.
      	* tree-pass.h (struct ipa_opt_pass_d): Rename fromstruct
      	ipa_opt_pass.  Change all uses.
      	* tree-predcom.c (struct dref_d): Rename from struct dref.  Change
      	all uses.
      
      	* c-decl.c (pushtag): If -Wc++-compat, warn if the tag is already
      	defined as a typedef.
      	(grokdeclarator): If -Wc++-compat, warn if a typedef is already
      	defined as a tag.
      gcc/cp/ChangeLog:
      	* cp-tree.h (enum cp_lvalue_kind_flags): Rename from
      	cp_lvalue_kind.  Change all uses.
      	(enum base_access_flags): Rename from enum base_access.  Change
      	all uses.
      	* parser.c (enum cp_parser_flags): Remove enum tag.
      gcc/testsuite/ChangeLog:
      	* gcc.dg/Wcxx-compat-10.c: New testcase.
      libcpp/ChangeLog:
      	* include/cpplib.h (enum cpp_builtin_type): Rename from enum
      	builtin_type.  Change all uses.
      
      From-SVN: r147605
      Ian Lance Taylor committed
  22. 15 May, 2009 1 commit
    • re PR c/16302 (gcc fails to warn about some common logic errors) · a243fb4a
      2009-05-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR 16302
      	* fold-const.c (make_range,build_range_check,merge_ranges): Move
      	declaration to...
      	(merge_ranges): Returns bool. 
      	* tree.h (make_range): .. to here.
      	(build_range_check): Likewise.
      	(merge_ranges): Likewise. Renamed from merge_ranges.
      	* c-typeck.c (parser_build_binary_op): Update calls to
      	warn_logical_operator.
      	* c-common.c (warn_logical_operator): Add new warning.
      	* c-common.h (warn_logical_operator): Update declaration.
      cp/
      	* call.c (build_new_op): Update calls to warn_logical_operator.
      	
      testsuite/
      	* gcc.dg/pr16302.c: New.
      	* g++.dg/warn/pr16302.C: New.
      
      From-SVN: r147596
      Manuel López-Ibáñez committed
  23. 14 May, 2009 4 commits
    • Correct formatting errors commited in rev 147516 · 16f7ad42
      From-SVN: r147547
      Taras Glek committed
    • passes.c (finish_optimization_passes): Change i to int. · 09639a83
      ./:	* passes.c (finish_optimization_passes): Change i to int.
      	* plugin.c (plugins_active_p): Change event to int.
      	(dump_active_plugins): Likewise.
      	* reginfo.c (invalid_mode_change_p): Change to to unsigned int.
      	Add cast.
      	* tree.c (tree_range_check_failed): Change c to unsigned int.
      	(omp_clause_range_check_failed): Likewise.
      	(build_common_builtin_nodes): Change mode to int.  Add cast.
      	* config/ia64/ia64.c (is_emitted): Change r to unsigned int.
      	(ia64_hard_regno_rename_ok, ia64_eh_uses): Likewise.
      
      	* c-typeck.c (build_unary_op): If -Wc++-compat, warn about using
      	++ or -- with a variable of enum type.
      cp/:
      	* class.c (layout_class_type): Change itk to unsigned int.
      	* decl.c (finish_enum): Change itk to unsigned int.
      	* parser.c (cp_parser_check_decl_spec): Change ds to int.  Remove
      	casts.
      fortran/:
      	* decl.c (match_attr_spec): Change d to unsigned int.
      	* dump-parse-tree.c (show_namespace): Change op to int.  Add cast.
      	* interface.c (gfc_check_interfaces): Change i to int.  Add casts.
      	* module.c (read_module): Change i to int.  Add cast.
      	(write_module): Change i to int.
      	* symbol.c (gfc_get_namespace): Change in to int.
      	(gfc_free_namespace): Change i to int.
      	* trans-io.c (gfc_build_io_library_fndecls): Change ptype to
      	unsigned int.  Add cast.
      	* trans-types.c (gfc_init_kinds): Change mode to unsigned int.
      	Add casts.
      testsuite/:
      	* gcc.dg/Wcxx-compat-9.c: New testcase.
      
      From-SVN: r147544
      Ian Lance Taylor committed
    • Updated the wrong changelog · 1806edae
      From-SVN: r147515
      Taras Glek committed
    • decl.c (duplicate_decls): Preserve parameter attributes. · bb36cc75
      2009-05-13  David Mandelin <dmandelin@mozilla.com>:
      gcc/
            * decl.c (duplicate_decls): Preserve parameter attributes.
      
      From-SVN: r147514
      David Mandelin committed