Age | Commit message (Collapse) | Author | Files | Lines |
|
PR c++/49793
* typeck2.c (check_narrowing): Downgrade permerror to pedwarn.
Make conditional on -Wnarrowing.
From-SVN: r176665
|
|
non-c++0x mode.
Warn about the use of final/override in non-c++0x mode, and
add __final for non-c++0x mode.
* cp-tree.h (cpp0x_warn_str): Add CPP0X_OVERRIDE_CONTROLS.
* error.c (maybe_warn_cpp0x): Adjust.
* parser.c (cp_parser_virt_specifier_seq_opt): Use it. Add
'__final' as a non-c++0x alternative for 'final'.
From-SVN: r176655
|
|
PR c++/30112
gcc/c-family/
* c-common.h: Declare c_linkage_bindings.
* c-pragma.c (handle_pragma_redefine_extname): Use it.
gcc/
* c-decl.c (c_linkage_bindings): Define.
gcc/cp/
* decl.c (cp_finish_decl): Apply pragma redefine_extname in
other namespaces as well.
* name-lookup.c (c_linkage_bindings): Define.
(lookup_extern_c_fun_in_all_ns): Rename from
lookup_extern_c_fun_binding_in_all_ns. Return tree.
(pushdecl_maybe_friend_1): Adjust. Copy DECL_ASSEMBLER_NAME.
Co-Authored-By: Mark Glisse <marc.glisse@normalesup.org>
From-SVN: r176650
|
|
initializer syntax.
* parser.c (cp_parser_initializer_list): Handle C99 .id= and [N]=
designated initializer syntax.
* decl.c (check_array_designated_initializer): Add index parm.
(maybe_deduce_size_from_array_init): Pass it.
(reshape_init_array_1): Likewise.
From-SVN: r176530
|
|
From-SVN: r176514
|
|
PR c++/6709 (DR 743)
PR c++/42603 (DR 950)
gcc/cp/
* parser.c (token_is_decltype, cp_lexer_next_token_is_decltype): New.
(cp_parser_nested_name_specifier_opt): Allow decltype.
(cp_parser_qualifying_entity): Likewise.
(cp_parser_decltype): Replace source tokens with CPP_DECLTYPE.
(cp_parser_simple_type_specifier): Handle decltype as scope.
(cp_parser_base_specifier): Allow decltype.
(cp_parser_base_clause): Don't crash on null base.
* parser.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move to c-common.h.
(CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
gcc/c-family/
* c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
(CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
(CPP_DECLTYPE): New.
* c-common.c (c_parse_error): Handle CPP_DECLTYPE.
From-SVN: r176513
|
|
PR c++/49785
* pt.c (coerce_template_parms): Handle non-pack after pack.
From-SVN: r176472
|
|
2011-07-19 Richard Guenther <rguenther@suse.de>
* tree.h (fold_build_pointer_plus_loc): New helper function.
(fold_build_pointer_plus_hwi_loc): Likewise.
(fold_build_pointer_plus): Define.
(fold_build_pointer_plus_hwi): Likewise.
* builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus.
(fold_builtin_memory_op): Likewise.
(fold_builtin_stpcpy): Likewise.
(fold_builtin_memchr): Likewise.
(fold_builtin_strstr): Likewise.
(fold_builtin_strchr): Likewise.
(fold_builtin_strrchr): Likewise.
(fold_builtin_strpbrk): Likewise.
(fold_builtin_strcat): Likewise.
(expand_builtin_memory_chk): Likewise.
(fold_builtin_memory_chk): Likewise.
* c-typeck.c (build_unary_op): Likewise.
* cgraphunit.c (thunk_adjust): Likewise.
* fold-const.c (build_range_check): Likewise.
(fold_binary_loc): Likewise.
* omp-low.c (extract_omp_for_data): Likewise.
(expand_omp_for_generic): Likewise.
(expand_omp_for_static_nochunk): Likewise.
(expand_omp_for_static_chunk): Likewise.
* tree-affine.c (add_elt_to_tree): Likewise.
* tree-data-ref.c (split_constant_offset_1): Likewise.
* tree-loop-distribution.c (generate_memset_zero): Likewise.
* tree-mudflap.c (mf_xform_derefs_1): Likewise.
* tree-predcom.c (ref_at_iteration): Likewise.
* tree-ssa-address.c (tree_mem_ref_addr): Likewise.
(add_to_parts): Likewise.
(create_mem_ref): Likewise.
* tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
* tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise.
(number_of_iterations_le): Likewise.
* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise.
* tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
(vect_create_addr_base_for_vector_ref): Likewise.
* tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Likewise.
(vect_create_cond_for_alias_checks): Likewise.
* tree-vrp.c (extract_range_from_assert): Likewise.
* config/alpha/alpha.c (alpha_va_start): Likewise.
(alpha_gimplify_va_arg_1): Likewise.
* config/i386/i386.c (ix86_va_start): Likewise.
(ix86_gimplify_va_arg): Likewise.
* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
* config/mep/mep.c (mep_expand_va_start): Likewise.
(mep_gimplify_va_arg_expr): Likewise.
* config/mips/mips.c (mips_va_start): Likewise.
(mips_gimplify_va_arg_expr): Likewise.
* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
* config/rs6000/rs6000.c (rs6000_va_start): Likewise.
(rs6000_gimplify_va_arg): Likewise.
* config/s390/s390.c (s390_va_start): Likewise.
(s390_gimplify_va_arg): Likewise.
* config/sh/sh.c (sh_va_start): Likewise.
(sh_gimplify_va_arg_expr): Likewise.
* config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise.
* config/spu/spu.c (spu_va_start): Likewise.
(spu_gimplify_va_arg_expr): Likewise.
* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
Likewise.
(xstormy16_gimplify_va_arg_expr): Likewise.
* config/xtensa/xtensa.c (xtensa_va_start): Likewise.
(xtensa_gimplify_va_arg_expr): Likewise.
c-family/
* c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
* c-omp.c (c_finish_omp_for): Likewise.
cp/
* call.c (build_special_member_call): Use fold_build_pointer_plus.
* class.c (build_base_path): Likewise.
(convert_to_base_statically): Likewise.
(dfs_accumulate_vtbl_inits): Likewise.
* cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
* except.c (expand_start_catch_block): Likewise.
* init.c (expand_virtual_init): Likewise.
(build_new_1): Likewise.
(build_vec_delete_1): Likewise.
(build_vec_delete): Likewise.
* rtti.c (build_headof): Likewise.
(tinfo_base_init): Likewise.
* typeck.c (get_member_function_from_ptrfunc): Likewise.
(cp_build_addr_expr_1): Likewise.
* typeck2.c (build_m_component_ref): Likewise.
fortran/
* trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
(gfc_trans_string_copy): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
* trans-types.c (gfc_get_array_descr_info): Likewise.
* trans.c (gfc_build_array_ref): Likewise.
java/
* builtins.c (static): Use fold_build_pointer_plus.
* class.c (make_class_data): Likewise.
(build_symbol_entry): Likewise.
* except.c (build_exception_object_ref): Likewise.
* expr.c (build_java_arrayaccess): Likewise.
(build_field_ref): Likewise.
(build_known_method_ref): Likewise.
(build_invokevirtual): Likewise.
objc/
* objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref):
Use fold_build_pointer_plus.
(objc2_build_ehtype_initializer): Likewise.
From-SVN: r176461
|
|
2011-07-18 Martin Jambor <mjambor@suse.cz>
gcc/cp/
* parser.c (cp_parser_parameter_declaration_list): Initialize
parenthesized_p.
From-SVN: r176423
|
|
gcc/cp/
* pt.c (tinst_level_tick, last_template_error_tick): Replace with
last_error_tinst_level.
(push_tinst_level, pop_tinst_level): Adjust.
(problematic_instantiation_changed): Adjust.
(record_last_problematic_instantiation): Adjust.
* error.c (cp_print_error_function): Don't print
current_function_decl if we're in a template instantiation context.
(print_instantiation_full_context): Always print first line.
gcc/testsuite/
* lib/prune.exp (prune_gcc_output): Prune "In substitution" too.
From-SVN: r176366
|
|
each function failed to match.)
PR c++/45329
PR c++/48934
* cp-tree.h (fn_type_unification): Add `bool' parameter.
* pt.c (enum template_base_result): Define.
(unify_success, unify_unknown): Define.
(unify_parameter_deduction_failure): Define.
(unify_invalid, unify_cv_qual_mismatch, unify_type_mismatch): Define.
(unify_parameter_pack_mismatch): Define.
(unify_parameter_pack_inconsistent): Define.
(unify_ptrmem_cst_mismatch, unify_vla_arg): Define.
(unify_expression_unequal, unify_inconsistency): Define.
(unify_method_type_error, unify_arity): Likewise.
(unify_too_many_parameters, unify_too_few_parameters): Define.
(unify_arg_conversion, unify_no_common_base): Define.
(unify_illformed_ptrmem_cst_expr): Define.
(unify_substitution_failure): Define.
(unify_inconsistent_template_template_parameters): Define.
(unify_template_deduction_failure): Define.
(unify_template_argument_mismatch): Define.
(unify_overload_resolution_failure): Define.
(comp_template_args_with_info): New function, split out from...
(comp_template_args): ...here. Call it.
(deduction_tsubst_fntype): Add `complain' parameter'. Pass it
to tsubst.
(unify): Add `explain_p' parameter. Pass to all relevant calls.
Call above status functions when appropriate.
(resolve_overloaded_unification, try_one_overload): Likewise.
(type_unification, type_unification_real): Likewise.
(unify_pack_expansion): Likewise.
(get_template_base, try_class_unification): Likewise.
(get_bindings, more_specialized_fn): Pass false to unification
calls.
(get_class_bindings, do_auto_deduction): Likewise.
(convert_nontype_argument): Likewise.
(fn_type_unification): Likewise. Pass tf_warning_or_error if
explain_p.
(get_template_base): Add `explain_p' parameter and pass it to
try_class_unification. Return an enum template_base_result.
* class.c (resolve_address_of_overloaded_function): Pass false to
fn_type_unification.
* call.c (enum rejection_reason_code): Add new codes.
(struct rejection_reason): Add template_unification field.
Add template_instantiation field.
(template_unification_rejection): Define.
(template_unification_error_rejection): Define.
(template_instantiation_rejection): Define.
(invalid_copy_with_fn_template_rejection): Define.
(add_template_candidate): Pass false to unify.
Provide more rejection reasons when possible.
(print_template_unification_rejection): Define.
(print_arity_rejection): Define, split out from...
(print_z_candidate): ...here. Add cases for new rejection
reasons.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r176365
|
|
* Make-lang.in (check-g++-strict-gc): New.
(cp/except.o): Depend on gt-cp-except.h
* except.c: Include gt-cp-except.h.
* config-lang.in (gtfiles): Add cp/except.c.
* decl2.c (mark_used): Adjust constexpr condition, set
function_depth around template instantiation.
* parser.c (cp_parser_lambda_body): Set function_depth.
* semantics.c (maybe_add_lambda_conv_op): Likewise.
From-SVN: r176350
|
|
PR testsuite/49741
gcc/
* Makefile.in ($(lang_checks_parallelized)): Allow --extra_opts
rather than --tool_opts.
gcc/cp/
* Make-lang.in (check-c++0x): Use --extra_opts instead of--tool_opts.
gcc/testsuite/
* lib/g++.exp (${tool}_option_help, ${tool}_option_proc): Restore.
Use --extra_opts instead of --additional_options.
* Makefile.in (check-c++): Move check-gcc-c++0x after
check-target-libstdc++-v3.
From-SVN: r176332
|
|
Also test -std=c++0x mode with 'make check-c++' at top level
* Makefile.in (check-gcc-c++0x): New.
(check-c++): Depend on it.
gcc/
* Makefile.in ($(lang_checks_parallelized)): Allow --tool_opts.
gcc/cp/
* Make-lang.in (check-c++0x): New.
gcc/testsuite/
* lib/g++.exp (${tool}_option_help, ${tool}_option_proc): Remove.
* lib/lto.exp (lto_prune_warns): Prune warning about -std=c++0x
when compiling C files.
From-SVN: r176250
|
|
gcc/
* tree.h (categorize_ctor_elements): Remove comment. Fix long line.
(count_type_elements): Delete.
(complete_ctor_at_level_p): Declare.
* expr.c (flexible_array_member_p): New function, split out from...
(count_type_elements): ...here. Make static. Replace allow_flexarr
parameter with for_ctor_p. When for_ctor_p is true, return the
number of elements that should appear in the top-level constructor,
otherwise return an estimate of the number of scalars.
(categorize_ctor_elements): Replace p_must_clear with p_complete.
(categorize_ctor_elements_1): Likewise. Use complete_ctor_at_level_p.
(complete_ctor_at_level_p): New function, borrowing union logic
from old categorize_ctor_elements_1.
(mostly_zeros_p): Return true if the constructor is not complete.
(all_zeros_p): Update call to categorize_ctor_elements.
* gimplify.c (gimplify_init_constructor): Update call to
categorize_ctor_elements. Don't call count_type_elements.
Unconditionally prevent clearing for variable-sized types,
otherwise rely on categorize_ctor_elements to detect
incomplete initializers.
gcc/cp/
* typeck2.c (split_nonconstant_init_1): Pass the initializer directly,
rather than a pointer to it. Return true if the whole of the value
was initialized by the generated statements. Use
complete_ctor_at_level_p instead of count_type_elements.
gcc/testsuite/
2011-07-12 Chung-Lin Tang <cltang@codesourcery.com>
* gcc.target/arm/pr48183.c: New test.
From-SVN: r176228
|
|
* name-lookup.h (cp_binding_level): Rename from cxx_scope.
Update all users.
(struct cp_binding_level): Fix indentation.
From-SVN: r176218
|
|
From-SVN: r176217
|
|
to a lambda function)
PR c++/49672
* pt.c (extract_fnparm_pack): Split out from...
(make_fnparm_pack): ...here.
(instantiate_decl): Handle non-pack parms after a pack.
* semantics.c (maybe_add_lambda_conv_op): Don't in a template.
From-SVN: r176183
|
|
From-SVN: r176177
|
|
PR c++/44609
* cp-tree.h (struct tinst_level): Add errors field.
* pt.c (neglectable_inst_p, limit_bad_template_recurson): New.
(push_tinst_level): Don't start another decl in that case.
(reopen_tinst_level): Adjust errors field.
* decl2.c (cp_write_global_declarations): Don't complain about
undefined inline if its template was defined.
* mangle.c (mangle_decl_string): Handle failure from push_tinst_level.
From-SVN: r176176
|
|
PR c++/49691
* parser.c (cp_parser_late_return_type_opt): Check quals parameter
rather than current_class_type to determine whether to set 'this'.
(cp_parser_direct_declarator): Pass -1 to quals if member_p is false.
(cp_parser_init_declarator): Pass down member_p.
From-SVN: r176120
|
|
From-SVN: r176084
|
|
PR c++/45437
gcc/
* gimplify.c (goa_stabilize_expr): Handle RHS preevaluation in
compound assignment.
gcc/c-family/
* c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
gcc/cp/
* typeck.c (cp_build_modify_expr): Preevaluate RHS.
From-SVN: r176072
|
|
gcc/
* cgraph.c (cgraph_add_to_same_comdat_group): New.
* cgraph.h: Declare it.
* ipa.c (function_and_variable_visibility): Make sure thunks
have the right visibility.
gcc/cp/
* method.c (use_thunk): Use cgraph_add_to_same_comdat_group.
* optimize.c (maybe_clone_body): Likewise.
* semantics.c (maybe_add_lambda_conv_op): Likewise.
From-SVN: r176071
|
|
PR c++/45603
* decl.c (expand_static_init): Don't get confused by user
declaration of __cxa_guard_acquire.
From-SVN: r176054
|
|
* typeck.c (cp_apply_type_quals_to_decl): Don't check
COMPLETE_TYPE_P either.
From-SVN: r176052
|
|
constructor placed in .data not .rodata)
PR c++/49673
gcc/c-family/
* c-common.c (c_apply_type_quals_to_decl): Don't check
TYPE_NEEDS_CONSTRUCTING.
gcc/cp/
* typeck.c (cp_apply_type_quals_to_decl): Don't check
TYPE_NEEDS_CONSTRUCTING.
From-SVN: r176045
|
|
PR c++/49663
* pt.c (push_deduction_access_scope): Preserve
processing_template_decl across push_to_top_level.
And revert:
* class.c (pushclass): Accept NULL argument.
(popclass): Deal with popping null class.
* pt.c (push_access_scope, pop_access_scope): Use them rather than
push_to_top_level/pop_from_top_level.
* name-lookup.c (lookup_name_real_1): Check current_class_type.
From-SVN: r176013
|
|
PR c/49644
* typeck.c (cp_build_binary_op): For MULT_EXPR and TRUNC_DIV_EXPR with
one non-complex and one complex argument, call save_expr on both
operands.
* g++.dg/torture/pr49644.C: New test.
From-SVN: r176006
|
|
forces them to stay)
PR c++/49353
* semantics.c (expand_or_defer_fn_1): Clear DECL_EXTERNAL
on kept inlines.
From-SVN: r175954
|
|
PR c++/49568
* method.c (make_thunk, use_thunk): Copy DECL_COMDAT.
From-SVN: r175938
|
|
PR c++/48157
* pt.c (tsubst_qualified_id): Preserve TEMPLATE_ID_EXPR in
partial instantiation.
From-SVN: r175904
|
|
PR c++/49598
* semantics.c (finish_id_expression): convert_from_reference.
From-SVN: r175857
|
|
2011-07-05 Richard Guenther <rguenther@suse.de>
c-family/
* c-common.c (c_common_nodes_and_builtins): Build all common
tree nodes first.
* c-decl.c (c_init_decl_processing): Defer building common
tree nodes to c_common_nodes_and_builtins.
cp/
* decl.c (cxx_init_decl_processing): Defer building common
tree nodes to c_common_nodes_and_builtins.
From-SVN: r175856
|
|
DR 1207
PR c++/49589
* mangle.c (write_expression): Handle 'this'.
* parser.c (cp_parser_postfix_dot_deref_expression): Allow
incomplete *this.
* semantics.c (potential_constant_expression_1): Check that
DECL_CONTEXT is set on 'this'.
From-SVN: r175835
|
|
instantiation.
* error.c (dump_template_bindings): Don't print typenames
for a partial instantiation.
(dump_function_decl): If we aren't printing function arguments,
print template arguments as <args> rather than [with ...].
(dump_expr): Don't print return type or template header.
[BASELINK]: Use BASELINK_FUNCTIONS rather than get_first_fn.
* pt.c (dependent_template_arg_p): Handle null arg.
From-SVN: r175834
|
|
From-SVN: r175833
|
|
2011-07-01 Jonathan Wakely <jwakely.gcc@gmail.com>
PR c++/49605
* init.c (build_delete): Only warn for sfk_deleting_destructor.
From-SVN: r175771
|
|
* Make-lang.in (cp/decl.o): Depend on pointer-set.h.
(cp/class.o): Likewise.
(cp/error.o): Likewise.
(cp/name-lookup.o): Likewise.
(cp/decl2.o): Likewise. Don't depend on $(POINTER_SET_H).
From-SVN: r175767
|
|
cp/pt.c:6227)
PR c++/48261
* pt.c (lookup_template_function): Handle non-function.
From-SVN: r175766
|
|
inherited, template dependend member, using a typedef)
PR c++/48593
* pt.c (tsubst_qualified_id): Check PTRMEM_OK_P.
* tree.c (build_qualified_name): Set PTRMEM_OK_P.
* semantics.c (finish_parenthesized_expr): Clear PTRMEM_OK_P on
SCOPE_REF, too.
* cp-tree.h (PTRMEM_OK_P): Apply to SCOPE_REF, too.
(QUALIFIED_NAME_IS_TEMPLATE): Switch to lang flag 1.
From-SVN: r175765
|
|
PR c++/48883
PR c++/49609
* pt.c (resolve_nondeduced_context): Call mark_used.
From-SVN: r175764
|
|
PR c++/49085
* semantics.c (finish_offsetof): Complain about incomplete type.
From-SVN: r175758
|
|
From-SVN: r175744
|
|
__class_type_info_pseudo’)
PR c++/49387
* rtti.c (get_pseudo_ti_index): Call complete_type.
From-SVN: r175743
|
|
PR c++/49569
* method.c (implicitly_declare_fn): Set DECL_PARM_LEVEL and
DECL_PARM_INDEX on rhs parm.
From-SVN: r175738
|
|
From-SVN: r175737
|
|
PR c++/49355
* tree.c (stabilize_init): Handle aggregate initialization.
From-SVN: r175736
|
|
PR c++/48481
* name-lookup.c (struct arg_lookup): Add fn_set.
(add_function): Check it.
(lookup_arg_dependent_1): Initialize it.
From-SVN: r175732
|
|
braced-init-list for arrays)
PR c++/49216
* init.c (build_new_1): Pass {} down to build_vec_init.
(build_vec_init): Handle it.
From-SVN: r175674
|