summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.dg/cpp0x/nullptr15.C
Commit message (Collapse)AuthorAgeFilesLines
* * lib/g++-dg.exp (g++-dg-runtest): Run tests in C++1y mode, too.jason2014-03-071-2/+2
| | | | | | | | | | | | | | * lib/target-supports.exp (check_effective_target_c++11): Now means C++11 and up. (check_effective_target_c++11_only): New. (check_effective_target_c++11_down): New. (check_effective_target_c++1y): New. (check_effective_target_c++1y_only): New. (check_effective_target_c++98_only): Rename from check_effective_target_c++98. * g++.dg/*: Use { target c++11 } instead of -std=c++11. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208416 138bc75d-0d04-0410-961f-82ee72b054a4
* ++0x -> ++11.mrs2013-10-221-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203939 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/45329jason2011-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176365 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/cp/froydnj2010-12-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/45329 * call.c (struct conversion): Document bad_p field. (enum rejection_reason_code): Define. (struct conversion_info): Define. (struct rejection_reason): Define. (struct z_candidate): Add `reason' field. (add_candidate): Add `reason' parameter. Store it in CAND. (alloc_rejection, arity_rejection, arg_conversion_rejection): New functions. (bad_arg_conversion_rejection): New function. (convert_class_to_reference): Add comment. (remaining_arguments): New function. (add_function_candidate): Record rejection reason and pass it to add_candidate. (add_conv_candidate, build_builtin_candidate): Likewise. (add_template_candidate_real): Likewise. (print_conversion_rejection): New function. (print_z_candidate): Print CAND->REASON if it exists. Adjust diagnostic strings. (print_z_candidates): Add location_t argument. Adjust calling sequence for print_z_candidate. Print header line directly. (build_user_type_conversion_1): Add reason for rejection to CAND. Adjust call to print_z_candidates. (print_error_for_call_failure): New function. (build_new_function_call): Call it. Adjust call to print_z_candidates. (build_operator_new_call): Likewise. (build_op_call): Likewise. (build_conditional_expr): Likewise. (build_new_op): Likewise. (build_new_method_call): Likewise. gcc/testsuite/ PR c++/45329 * testsuite/g++.dg/conversion/ambig1.C: Adjust. * testsuite/g++.dg/conversion/op1.C: Adjust. * testsuite/g++.dg/conversion/simd1.C: Adjust. * testsuite/g++.dg/cpp0x/defaulted14.C: Adjust. * testsuite/g++.dg/cpp0x/defaulted18.C: Adjust. * testsuite/g++.dg/cpp0x/defaulted20.C: Adjust. * testsuite/g++.dg/cpp0x/explicit3.C: Adjust. * testsuite/g++.dg/cpp0x/explicit4.C: Adjust. * testsuite/g++.dg/cpp0x/implicit4.C: Adjust. * testsuite/g++.dg/cpp0x/nullptr15.C: Adjust. * testsuite/g++.dg/cpp0x/nullptr19.C: Adjust. * testsuite/g++.dg/cpp0x/pr31431-2.C: Adjust. * testsuite/g++.dg/cpp0x/pr31431.C: Adjust. * testsuite/g++.dg/cpp0x/pr31434.C: Adjust. * testsuite/g++.dg/cpp0x/pr31437.C: Adjust. * testsuite/g++.dg/cpp0x/rv2n.C: Adjust. * testsuite/g++.dg/cpp0x/rv3n.C: Adjust. * testsuite/g++.dg/cpp0x/rv4n.C: Adjust. * testsuite/g++.dg/cpp0x/rv5n.C: Adjust. * testsuite/g++.dg/cpp0x/rv6n.C: Adjust. * testsuite/g++.dg/cpp0x/rv7n.C: Adjust. * testsuite/g++.dg/cpp0x/temp_default2.C: Adjust. * testsuite/g++.dg/cpp0x/trailing4.C: Adjust. * testsuite/g++.dg/cpp0x/variadic-ex3.C: Adjust. * testsuite/g++.dg/cpp0x/variadic-ex4.C: Adjust. * testsuite/g++.dg/cpp0x/variadic35.C: Adjust. * testsuite/g++.dg/cpp0x/vt-35147.C: Adjust. * testsuite/g++.dg/cpp0x/vt-37737-2.C: Adjust. * testsuite/g++.dg/expr/cond9.C: Adjust. * testsuite/g++.dg/expr/pmf-1.C: Adjust. * testsuite/g++.dg/ext/label5.C: Adjust. * testsuite/g++.dg/ext/visibility/anon8.C: Adjust. * testsuite/g++.dg/ext/vla2.C: Adjust. * testsuite/g++.dg/gomp/pr26690-1.C: Adjust. * testsuite/g++.dg/gomp/pr26690-2.C: Adjust. * testsuite/g++.dg/init/synth2.C: Adjust. * testsuite/g++.dg/lookup/conv-1.C: Adjust. * testsuite/g++.dg/lookup/new1.C: Adjust. * testsuite/g++.dg/lookup/using9.C: Adjust. * testsuite/g++.dg/other/error13.C: Adjust. * testsuite/g++.dg/other/error20.C: Adjust. * testsuite/g++.dg/other/error31.C: Adjust. * testsuite/g++.dg/other/pr28114.C: Adjust. * testsuite/g++.dg/other/ptrmem10.C: Adjust. * testsuite/g++.dg/other/ptrmem11.C: Adjust. * testsuite/g++.dg/overload/ambig1.C: Adjust. * testsuite/g++.dg/overload/arg3.C: Adjust. * testsuite/g++.dg/overload/builtin1.C: Adjust. * testsuite/g++.dg/overload/copy1.C: Adjust. * testsuite/g++.dg/overload/new1.C: Adjust. * testsuite/g++.dg/overload/template4.C: Adjust. * testsuite/g++.dg/overload/unknown1.C: Adjust. * testsuite/g++.dg/overload/using2.C: Adjust. * testsuite/g++.dg/parse/crash5.C: Adjust. * testsuite/g++.dg/parse/error19.C: Adjust. * testsuite/g++.dg/parse/error28.C: Adjust. * testsuite/g++.dg/parse/template7.C: Adjust. * testsuite/g++.dg/parse/typename7.C: Adjust. * testsuite/g++.dg/rtti/typeid6.C: Adjust. * testsuite/g++.dg/tc1/dr152.C: Adjust. * testsuite/g++.dg/template/conv11.C: Adjust. * testsuite/g++.dg/template/copy1.C: Adjust. * testsuite/g++.dg/template/crash37.C: Adjust. * testsuite/g++.dg/template/deduce3.C: Adjust. * testsuite/g++.dg/template/dependent-expr5.C: Adjust. * testsuite/g++.dg/template/error38.C: Adjust. * testsuite/g++.dg/template/error40.C: Adjust. * testsuite/g++.dg/template/friend.C: Adjust. * testsuite/g++.dg/template/incomplete2.C: Adjust. * testsuite/g++.dg/template/instantiate5.C: Adjust. * testsuite/g++.dg/template/local4.C: Adjust. * testsuite/g++.dg/template/local6.C: Adjust. * testsuite/g++.dg/template/new3.C: Adjust. * testsuite/g++.dg/template/operator9.C: Adjust. * testsuite/g++.dg/template/overload6.C: Adjust. * testsuite/g++.dg/template/ptrmem2.C: Adjust. * testsuite/g++.dg/template/ptrmem20.C: Adjust. * testsuite/g++.dg/template/ptrmem4.C: Adjust. * testsuite/g++.dg/template/ptrmem8.C: Adjust. * testsuite/g++.dg/template/qualttp5.C: Adjust. * testsuite/g++.dg/template/sfinae2.C: Adjust. * testsuite/g++.dg/template/spec22.C: Adjust. * testsuite/g++.dg/template/spec23.C: Adjust. * testsuite/g++.dg/template/ttp25.C: Adjust. * testsuite/g++.dg/template/typedef4.C: Adjust. * testsuite/g++.dg/template/unify10.C: Adjust. * testsuite/g++.dg/template/unify11.C: Adjust. * testsuite/g++.dg/template/unify6.C: Adjust. * testsuite/g++.dg/template/unify7.C: Adjust. * testsuite/g++.dg/template/unify9.C: Adjust. * testsuite/g++.dg/template/varmod1.C: Adjust. * testsuite/g++.old-deja/g++.benjamin/15799.C: Adjust. * testsuite/g++.old-deja/g++.benjamin/15800-1.C: Adjust. * testsuite/g++.old-deja/g++.brendan/ambiguity1.C: Adjust. * testsuite/g++.old-deja/g++.brendan/crash29.C: Adjust. * testsuite/g++.old-deja/g++.brendan/crash48.C: Adjust. * testsuite/g++.old-deja/g++.brendan/crash56.C: Adjust. * testsuite/g++.old-deja/g++.brendan/cvt3.C: Adjust. * testsuite/g++.old-deja/g++.brendan/overload1.C: Adjust. * testsuite/g++.old-deja/g++.brendan/overload4.C: Adjust. * testsuite/g++.old-deja/g++.brendan/overload9.C: Adjust. * testsuite/g++.old-deja/g++.bugs/900127_01.C: Adjust. * testsuite/g++.old-deja/g++.bugs/900205_04.C: Adjust. * testsuite/g++.old-deja/g++.bugs/900330_02.C: Adjust. * testsuite/g++.old-deja/g++.bugs/900404_03.C: Adjust. * testsuite/g++.old-deja/g++.bugs/900514_03.C: Adjust. * testsuite/g++.old-deja/g++.eh/ctor1.C: Adjust. * testsuite/g++.old-deja/g++.jason/conversion11.C: Adjust. * testsuite/g++.old-deja/g++.jason/crash3.C: Adjust. * testsuite/g++.old-deja/g++.jason/overload16.C: Adjust. * testsuite/g++.old-deja/g++.jason/overload28.C: Adjust. * testsuite/g++.old-deja/g++.jason/scoping10.C: Adjust. * testsuite/g++.old-deja/g++.jason/template30.C: Adjust. * testsuite/g++.old-deja/g++.jason/temporary2.C: Adjust. * testsuite/g++.old-deja/g++.law/arg1.C: Adjust. * testsuite/g++.old-deja/g++.law/arg11.C: Adjust. * testsuite/g++.old-deja/g++.law/arm9.C: Adjust. * testsuite/g++.old-deja/g++.law/ctors11.C: Adjust. * testsuite/g++.old-deja/g++.law/ctors17.C: Adjust. * testsuite/g++.old-deja/g++.law/ctors5.C: Adjust. * testsuite/g++.old-deja/g++.law/ctors9.C: Adjust. * testsuite/g++.old-deja/g++.law/enum4.C: Adjust. * testsuite/g++.old-deja/g++.law/missed-error2.C: Adjust. * testsuite/g++.old-deja/g++.law/operators32.C: Adjust. * testsuite/g++.old-deja/g++.law/operators9.C: Adjust. * testsuite/g++.old-deja/g++.mike/net2.C: Adjust. * testsuite/g++.old-deja/g++.mike/net22.C: Adjust. * testsuite/g++.old-deja/g++.mike/p11110.C: Adjust. * testsuite/g++.old-deja/g++.mike/p1989.C: Adjust. * testsuite/g++.old-deja/g++.mike/p2431.C: Adjust. * testsuite/g++.old-deja/g++.mike/p438.C: Adjust. * testsuite/g++.old-deja/g++.mike/p807a.C: Adjust. * testsuite/g++.old-deja/g++.mike/p9068.C: Adjust. * testsuite/g++.old-deja/g++.niklas/t120.C: Adjust. * testsuite/g++.old-deja/g++.niklas/t121.C: Adjust. * testsuite/g++.old-deja/g++.niklas/t128.C: Adjust. * testsuite/g++.old-deja/g++.ns/overload2.C: Adjust. * testsuite/g++.old-deja/g++.ns/using12.C: Adjust. * testsuite/g++.old-deja/g++.other/crash24.C: Adjust. * testsuite/g++.old-deja/g++.other/expr1.C: Adjust. * testsuite/g++.old-deja/g++.other/overload11.C: Adjust. * testsuite/g++.old-deja/g++.other/pmf3.C: Adjust. * testsuite/g++.old-deja/g++.other/volatile1.C: Adjust. * testsuite/g++.old-deja/g++.pt/auto_ptr.C: Adjust. * testsuite/g++.old-deja/g++.pt/crash28.C: Adjust. * testsuite/g++.old-deja/g++.pt/crash60.C: Adjust. * testsuite/g++.old-deja/g++.pt/explicit38.C: Adjust. * testsuite/g++.old-deja/g++.pt/explicit39.C: Adjust. * testsuite/g++.old-deja/g++.pt/explicit41.C: Adjust. * testsuite/g++.old-deja/g++.pt/explicit67.C: Adjust. * testsuite/g++.old-deja/g++.pt/explicit77.C: Adjust. * testsuite/g++.old-deja/g++.pt/expr2.C: Adjust. * testsuite/g++.old-deja/g++.pt/ptrmem10.C: Adjust. * testsuite/g++.old-deja/g++.pt/ptrmem6.C: Adjust. * testsuite/g++.old-deja/g++.pt/spec35.C: Adjust. * testsuite/g++.old-deja/g++.pt/spec5.C: Adjust. * testsuite/g++.old-deja/g++.pt/spec6.C: Adjust. * testsuite/g++.old-deja/g++.pt/t05.C: Adjust. * testsuite/g++.old-deja/g++.pt/t24.C: Adjust. * testsuite/g++.old-deja/g++.pt/unify4.C: Adjust. * testsuite/g++.old-deja/g++.pt/unify6.C: Adjust. * testsuite/g++.old-deja/g++.pt/unify8.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb109.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb119.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb131.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb22.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb69.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb98.C: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167607 138bc75d-0d04-0410-961f-82ee72b054a4
* * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.jason2010-06-051-0/+3
| | | | | | * typeck.c (build_ptrmemfunc): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160309 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/20669jason2010-05-121-1/+1
| | | | | | | | | | | * call.c (add_template_candidate_real): If deduction fails, still add the template as a non-viable candidate. (equal_functions): Handle template candidates. (print_z_candidate): Likewise. (print_z_candidates): Likewise. (build_new_function_call): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159335 138bc75d-0d04-0410-961f-82ee72b054a4
* Add support for C++0x nullptr.jason2010-05-061-0/+21
gcc: * c-common.c (c_common_reswords): Add nullptr. * c-common.h: Add RID_NULLPTR. Reorganize C++0x rids. * dwarf2out.c (is_base_type): Handle NULLPTR_TYPE. (gen_type_die_with_usage): Likewise. * dbxout.c (dbxout_type): Likewise. * sdbout.c (plain_type_1): Likewise. gcc/cp: * cp-tree.def: Add NULLPTR_TYPE. * cp-tree.h: Add nullptr_node. (cp_tree_index): Add CPTI_NULLPTR. (SCALAR_TYPE_P): Add NULLPTR_TYPE. * call.c (null_ptr_cst_p): Handle nullptr. (standard_conversion): Likewise. (convert_arg_to_ellipsis): Likewise. * mangle.c (write_type): Likewise. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_parser_primary_expression): Likewise. * typeck.c (cp_build_binary_op): Likewise. (build_reinterpret_cast_1): Likewise. * error.c (dump_type): Likewise. (dump_type_prefix, dump_type_suffix): Likewise. * decl.c (cxx_init_decl_processing): Likewise. * cxx-pretty-print.c (pp_cxx_constant): Likewise. * cvt.c (ocp_convert): Likewise. * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put nullptr_t tinfo in libsupc++. libstdc++-v3: * config/abi/pre/gnu.ver: Add typeinfo for decltype(nullptr). libiberty: * cp-demangle.c (cplus_demangle_builtin_types): Add nullptr. (cplus_demangle_type): Handle nullptr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159131 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud