summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.dg/cpp1y
Commit message (Collapse)AuthorAgeFilesLines
...
* gcc/cp:emsr2013-10-232-0/+118
| | | | | | | | | | | | | | | | | | | | 2013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs. * parser.c (cp_parser_std_attribute): Interpret [[deprecated]] as [[gnu::deprecated]]. gcc/testsuite: 2013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs. * g++.dg/cpp1y/attr-deprecated.C: New. * g++.dg/cpp1y/attr-deprecated-neg.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203955 138bc75d-0d04-0410-961f-82ee72b054a4
* /cppaolo2013-10-021-0/+7
| | | | | | | | | | | | | | | | | | | 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58535 * parser.c (cp_parser_function_specifier_opt): Upon error about virtual templates don't set ds_virtual. (finish_fully_implicit_template): Reject virtual implicit templates. /testsuite 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58535 * g++.dg/parse/crash65.C: New. * g++.dg/cpp1y/pr58535.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203123 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix 58500.abutcher2013-09-231-0/+8
| | | | | | | | | | | | | gcc/cp/ PR c++/58500 * type-utils.h (find_type_usage): Only traverse one type level into member function pointers. gcc/testsuite/ PR c++/58500 * g++.dg/cpp1y/pr58500.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202851 138bc75d-0d04-0410-961f-82ee72b054a4
* /cppaolo2013-07-251-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/57981 * decl.c (check_default_argument): Take a tsubst_flags_t parameter. (grokparms): Adjust. * parser.c (cp_parser_late_parse_one_default_arg): Likewise. * pt.c (tsubst_default_argument, tsubst_default_arguments): Take a tsubst_flags_t parameter. (tsubst_decl): Adjust. * call.c (convert_default_arg): Likewise. * cp-tree.h (check_default_argument, tsubst_default_argument): Update declarations. /testsuite 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/57981 * g++.dg/cpp0x/pr57981.C: New. /cp 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/57880 * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16, CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF, CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF): Fix string_len management, tidy. /testsuite 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/57880 * g++.dg/cpp1y/udlit-empty-string-neg.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201245 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/57402jason2013-07-131-0/+23
| | | | | | | * init.c (build_vec_init): Use {} for arrays of class type. (build_vec_delete): Don't take the address of the array. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200939 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/57402jason2013-07-101-0/+24
| | | | | | | * init.c (build_vec_init): Don't take shortcuts when initializing a VLA. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200860 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpp:emsr2013-06-293-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net> * lex.c (lex_raw_string(), lex_string()): Constrain suffixes treated as concatenated literal and macro to just the patterns found in inttypes.h; (is_macro()): New. gcc/cp: 2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net> * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space. * parser.c (cp_parser_operator()): Parse user-defined string literal as literal operator. gcc/testsuite: 2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net> * g++.dg/cpp0x/udlit-nospace-neg.C: Adjust. * g++.dg/cpp1y/udlit-enc-prefix-neg.C: New. * g++.dg/cpp1y/udlit-userdef-string.C: New. * g++.dg/cpp1y/complex_literals.h: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200563 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/57408jason2013-06-271-0/+31
| | | | | | | * semantics.c (add_capture): Set type to error_mark_node after error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200449 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/cp:emsr2013-06-261-0/+8
| | | | | | | | | | | | | | | | | | | | 2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net> PR c++/57640 * parser.c (cp_parser_unqualified_id): Add declarator_p to checks to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment. gcc/testsuite: 2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net> PR c++/57640 * g++.dg/cpp1y/pr57640.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200415 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/55149jason2013-06-211-0/+31
| | | | | | | | | | | | | | | | * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE context if we're in C++14 mode. * tree.c (array_of_runtime_bound_p): Return true for a dependent bound that is not potentually constant. * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New. * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK. * semantics.c (build_lambda_object): Don't rvalue a VLA capture. (build_capture_proxy): Set REFERENCE_VLA_OK. (vla_capture_type): Make it a proper C++ class. (add_capture): Set DECL_VLA_CAPTURE_P. Don't pre-digest the initializer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200279 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/55520jason2013-06-071-0/+12
| | | | | | | * semantics.c (add_capture): Diagnose capture of variable-size type that is not a C++1y array of runtime bound. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199780 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/57404jason2013-05-301-0/+14
| | | | | | | * cp-lang.c (cp_classify_record): Handle structs without TYPE_LANG_SPECIFIC. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199456 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/55149jason2013-05-101-0/+8
| | | | | | | | | * semantics.c (add_capture): Error rather than abort on copy capture of VLA. * typeck.c (maybe_warn_about_returning_address_of_local): Don't warn about capture proxy. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198776 138bc75d-0d04-0410-961f-82ee72b054a4
* N3639 C++1y VLA diagnosticsjason2013-05-091-0/+40
| | | | | | | | | | | | | * decl.c (grokdeclarator): Complain about reference, pointer, or typedef to VLA. (create_array_type_for_decl): Complain about array of VLA. * pt.c (tsubst): Likewise. * rtti.c (get_tinfo_decl): Talk about "array of runtime bound". * semantics.c (finish_decltype_type): Complain about decltype of VLA. * typeck.c (cp_build_addr_expr_1): Complain about VLA. (cxx_sizeof_or_alignof_type): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198746 138bc75d-0d04-0410-961f-82ee72b054a4
* N3639 C++1y VLA supportjason2013-05-093-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ * gimplify.c (gimplify_vla_decl): Don't touch an existing DECL_VALUE_EXPR. gcc/cp/ * decl.c (compute_array_index_type): Allow VLAs in C++1y mode. (check_array_initializer): Allow VLA init. (reshape_init_array_1): Adjust. (cp_finish_decl): Check for invalid VLA length. * typeck2.c (process_init_constructor_array): Adjust. (store_init_value): Use build_vec_init for VLAs. * semantics.c (add_capture): Capture VLA as ptr+len. (vla_capture_type): New. (build_capture_proxy): Rebuild the VLA. * typeck.c (build_simple_component_ref): Split out from... (build_ptrmemfunc_access_expr): ...here. * tree.c (array_of_runtime_bound_p): New. * init.c (throw_bad_array_length): New. (build_vec_init): Use it. * parser.c (cp_convert_range_for): When iterating over a VLA, use it directly rather than bind a reference. * cp-tree.h: Declare new functions. libstdc++-v3/ * libsupc++/new: Add std::bad_array_length. * libsupc++/bad_array_length.cc: New. * libsupc++/eh_aux_runtime.cc: Add __cxa_bad_array_length. * libsupc++/Makefile.in: Build them. * config/abi/pre/gnu.ver: Add new symbols. * config/abi/pre/gnu-versioned-namespace.ver: Add new symbols. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198745 138bc75d-0d04-0410-961f-82ee72b054a4
* N3472 binary constantsjakub2013-04-281-0/+14
| | | | | | | | | | | | | | | | | | | * include/cpplib.h (struct cpp_options): Fix a typo in user_literals field comment. Add binary_constants field. * init.c (struct lang_flags): Add binary_constants field. (lang_defaults): Add bin_cst column to the table. (cpp_set_lang): Initialize CPP_OPTION (pfile, binary_constants). * expr.c (cpp_classify_number): Talk about C++11 instead of C++0x in diagnostics. Accept binary constants if CPP_OPTION (pfile, binary_constants) even when pedantic. Adjust pedwarn message. * g++.dg/cpp/limits.C: Adjust warning wording. * g++.dg/system-binary-constants-1.C: Likewise. * g++.dg/cpp1y/system-binary-constants-1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198380 138bc75d-0d04-0410-961f-82ee72b054a4
* /libcpppaolo2013-04-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Y and CLK_CXX1Y. * init.c (lang_defaults): Add defaults for the latter. (cpp_init_builtins): Define __cplusplus as 201300L for the latter. * lex.c (_cpp_lex_direct): Update. /gcc/c-family 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y. /gcc/testsuite 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp1y/cplusplus.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198261 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>paolo2013-04-241-5/+0
| | | | | | | | | | | | | | | | | | * doc/cpp.texi: Remove __GXX_EXPERIMENTAL_CXX1Y__. /c-family 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> * c-cppbuiltin.c (c_cpp_builtins): Do not define __GXX_EXPERIMENTAL_CXX1Y__. /testsuite 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp1y/cxx1y_macro.C: Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198258 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>paolo2013-04-241-0/+5
| | | | | | | | | | | | | | | | | * doc/cpp.texi: Document __GXX_EXPERIMENTAL_CXX1Y__. /c-family 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__. /testsuite 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp1y/cxx1y_macro.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198249 138bc75d-0d04-0410-961f-82ee72b054a4
* N3648: init-captures are named.jason2013-04-241-0/+12
| | | | | | | | * semantics.c (add_capture): Don't prepend "__" to init-captures. (build_capture_proxy): Adjust. * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198247 138bc75d-0d04-0410-961f-82ee72b054a4
* N3648: Allow braced and parenthesized initializers.jason2013-04-241-0/+11
| | | | | | | | | | | * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer. * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE. * semantics.c (lambda_capture_field_type): Use do_auto_deduction. (add_capture): Collapse a parenthesized initializer into a single expression. * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198246 138bc75d-0d04-0410-961f-82ee72b054a4
* Core 1586jason2013-04-221-0/+22
| | | | | | | | | | | * parser.c (cp_parser_unqualified_id): Handle ~auto. (cp_parser_pseudo_destructor_name): Likewise. (cp_parser_postfix_dot_deref_expression): Adjust. (cp_lexer_nth_token_is_keyword): New. * semantics.c (finish_pseudo_destructor_expr): Handle ~auto. * typeck.c (lookup_destructor): Handle ~auto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198162 138bc75d-0d04-0410-961f-82ee72b054a4
* N3323jason2013-04-221-0/+32
| | | | | | | * cvt.c (build_expr_type_conversion): Two conversions that return the same type aren't necessarily ambiguous. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198157 138bc75d-0d04-0410-961f-82ee72b054a4
* N3648jason2013-04-226-0/+86
| | | | | | | * parser.c (cp_parser_lambda_introducer): Make lambda capture init pedwarn unconditional except in C++1y mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198156 138bc75d-0d04-0410-961f-82ee72b054a4
* * mangle.c (write_type): Mangle decltype(auto).jason2013-04-221-0/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198150 138bc75d-0d04-0410-961f-82ee72b054a4
* N3638 changes to return type deductionjason2013-04-195-1/+37
| | | | | | | | | | | | | | | | | | | | * decl.c (undeduced_auto_decl): New. (require_deduced_type): New. (fndecl_declared_return_type): New. (decls_match): Use it. (duplicate_decls): Don't check for auto return. (grokdeclarator): Reject virtual auto. * class.c (resolve_address_of_overloaded_function): Handle auto function templates. * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type. * cp-tree.h: Declare new fns. * error.c (dump_function_decl): Use fndecl_declared_return_type. * search.c (check_final_overrider): Likewise. * pt.c (make_decltype_auto): New. (do_auto_deduction): Require plain decltype(auto). (is_auto): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198099 138bc75d-0d04-0410-961f-82ee72b054a4
* Implement n3599 String literal operator templates.emsr2013-04-172-0/+20
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198018 138bc75d-0d04-0410-961f-82ee72b054a4
* N3582jason2013-03-294-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | * cp-tree.h (AUTO_IS_DECLTYPE): New. * parser.c (cp_parser_decltype): Handle decltype(auto). (cp_parser_type_id_1): Allow auto without a late-specified return in C++1y. (cp_parser_primary_expression): Use the return value of finish_parenthesized_expr. (cp_parser_transaction_expression): Likewise. * semantics.c (force_paren_expr): New. (finish_parenthesized_expr): Use it. * call.c (build_conditional_expr_1): Likewise. * pt.c (do_auto_deduction): Handle decltype(auto). (tsubst_copy): Handle PAREN_EXPR. (tsubst_copy_and_build): Likewise. * error.c (dump_expr): Handle PAREN_EXPR. * cxx-pretty-print.c (pp_cxx_expression): Likewise. * mangle.c (write_expression): Ignore PAREN_EXPR. * parser.c (cp_parser_decltype_expr): Split out... (cp_parser_decltype): ...from here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197248 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/56177jason2013-02-061-0/+5
| | | | | | | * decl.c (start_preparsed_function): Update restype if we change decl1. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195780 138bc75d-0d04-0410-961f-82ee72b054a4
* Implement return type deduction for normal functions with -std=c++1y.jason2012-03-2413-0/+124
* cp-tree.h (FNDECL_USED_AUTO): New macro. (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove. (dependent_lambda_return_type_node): Remove. (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove. (struct language_function): Add x_auto_return_pattern field. (current_function_auto_return_pattern): New. (enum tsubst_flags): Add tf_partial. * decl.c (decls_match): Handle auto return comparison. (duplicate_decls): Adjust error message for auto return. (cxx_init_decl_processing): Remove dependent_lambda_return_type_node. (cp_finish_decl): Don't do auto deduction for functions. (grokdeclarator): Allow auto return without trailing return type in C++1y mode. (check_function_type): Defer checking of deduced return type. (start_preparsed_function): Set current_function_auto_return_pattern. (finish_function): Set deduced return type to void if not previously deduced. * decl2.c (change_return_type): Handle error_mark_node. (mark_used): Always instantiate functions with deduced return type. Complain about use if deduction isn't done. * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for initial return type. (cp_parser_lambda_body): Don't deduce return type in a template. (cp_parser_conversion_type_id): Allow auto in C++1y. * pt.c (instantiate_class_template_1): Don't mess with LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P. (tsubst_copy_and_build): Likewise. (fn_type_unification, tsubst): Don't reduce the template parm level of 'auto' during deduction. (unify): Compare 'auto' specially. (get_bindings): Change test. (always_instantiate_p): Always instantiate functions with deduced return type. (do_auto_deduction): Handle error_mark_node and lambda context. Don't check for use in initializer. (contains_auto_r): Remove. * search.c (lookup_conversions_r): Handle auto conversion function. * semantics.c (lambda_return_type): Handle null return. Don't mess with dependent_lambda_return_type_node. (apply_deduced_return_type): Rename from apply_lambda_return_type. * typeck.c (merge_types): Handle auto. (check_return_expr): Do auto deduction. * typeck2.c (add_exception_specifier): Fix complain check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185768 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud