summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.dg/cpp1y
Commit message (Collapse)AuthorAgeFilesLines
* PR c++/63437jason2014-10-101-0/+31
| | | | | | | | * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF. * semantics.c (force_paren_expr): And set it. * typeck.c (check_return_expr): And handle it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@216106 138bc75d-0d04-0410-961f-82ee72b054a4
* * g++.dg/cpp1y/feat-cxx14.C: Variable templates not in yet.uros2014-10-101-4/+3
| | | | | | | | (dg-do): Use c++1y target. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@216063 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpp/emsr2014-10-088-0/+490
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2014-10-08 Edward Smith-Rowland <3dw4rd@verizon.net> Implement SD-6: SG10 Feature Test Recommendations * internal.h (lexer_state, spec_nodes): Add in__has_include__. * directives.c: Support __has_include__ builtin. * expr.c (parse_has_include): New function to parse __has_include__ builtin; (eval_token()): Use it. * files.c (_cpp_has_header()): New funtion to look for header; (open_file_failed()): Not an error to not find a header file for __has_include__. * identifiers.c (_cpp_init_hashtable()): Add entry for __has_include__. * pch.c (cpp_read_state): Lookup __has_include__. * traditional.c (enum ls, _cpp_scan_out_logical_line()): Walk through __has_include__ statements. gcc/c-family/ 2014-10-08 Edward Smith-Rowland <3dw4rd@verizon.net> Implement SD-6: SG10 Feature Test Recommendations * c-cppbuiltin.c (c_cpp_builtins()): Define language feature macros and the __has_header macro. libstdc++-v3/ 2014-10-08 Edward Smith-Rowland <3dw4rd@verizon.net> Implement SD-6: SG10 Feature Test Recommendations * include/bits/basic_string.h: Add __cpp_lib feature test macro. * include/bits/stl_algobase.h: Ditto. * include/bits/stl_function.h: Ditto. * include/bits/unique_ptr.h: Ditto. * include/std/chrono: Ditto. * include/std/complex: Ditto. * include/std/iomanip: Ditto. * include/std/shared_mutex: Ditto. * include/std/tuple: Ditto. * include/std/type_traits: Ditto. * include/std/utility: Ditto. * testsuite/experimental/feat-cxx14.cc: New. * testsuite/experimental/feat-lib-fund.cc: New. * testsuite/20_util/declval/requirements/1_neg.cc: Adjust. * testsuite/20_util/duration/literals/range.cc: Adjust. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Adjust. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Adjust. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust. * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust. * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc: Adjust. gcc/testsuite/ 2014-10-08 Edward Smith-Rowland <3dw4rd@verizon.net> Implement SD-6: SG10 Feature Test Recommendations * g++.dg/cpp1y/feat-cxx11-neg.C: New. * g++.dg/cpp1y/feat-cxx11.C: New. * g++.dg/cpp1y/feat-cxx14.C: New. * g++.dg/cpp1y/feat-cxx98.C: New. * g++.dg/cpp1y/feat-cxx98-neg.C: New. * g++.dg/cpp1y/phoobhar.h: New. * g++.dg/cpp1y/testinc/phoobhar.h: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@215998 138bc75d-0d04-0410-961f-82ee72b054a4
* cp/emsr2014-07-011-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | 2014-06-28 Edward Smith-Rowland <3dw4rd@verizon.net> PR c++/58781 PR c++/60249 PR c++/59867 * parser.c (cp_parser_userdef_string_literal()): Take a tree not a cp_token*. (cp_parser_string_literal(): Don't hack the token stream! testsuite/ 2014-06-28 Edward Smith-Rowland <3dw4rd@verizon.net> PR c++/58781 PR c++/60249 PR c++/59867 * testsuite/g++.dg/cpp0x/pr58781.C: New. * testsuite/g++.dg/cpp0x/pr60249.C: New. * testsuite/g++.dg/cpp1y/pr59867.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212188 138bc75d-0d04-0410-961f-82ee72b054a4
* PR testsuite/60672danglin2014-04-061-1/+2
| | | | | | | | * g++.dg/cpp1y/auto-fn25.C: Require lto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209165 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60626abutcher2014-03-291-0/+7
| | | | | | | | | | | PR c++/60626 * parser.c (cp_parser_init_declarator): Handle erroneous generic type usage in non-functions with pushed scope. PR c++/60626 * g++.dg/cpp1y/pr60626.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208940 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60573abutcher2014-03-281-0/+28
| | | | | | | | | | | | | | | | | | PR c++/60573 * name-lookup.h (cp_binding_level): New transient field defining_class_p to indicate whether a scope is in the process of defining a class. * semantics.c (begin_class_definition): Set defining_class_p. * name-lookup.c (leave_scope): Reset defining_class_p. * parser.c (synthesize_implicit_template_parm): Use cp_binding_level:: defining_class_p rather than TYPE_BEING_DEFINED as the predicate for unwinding to class-defining scope to handle the erroneous definition of a generic function of an arbitrarily nested class within an enclosing class. PR c++/60573 * g++.dg/cpp1y/pr60573.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208921 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60627abutcher2014-03-241-0/+12
| | | | | | | | | | | | PR c++/60627 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from introducing an implicit function template parameter within an explicit instantiation. PR c++/60627 * g++.dg/cpp1y/pr60627.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208799 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/60574jason2014-03-241-0/+15
| | | | | | | * decl.c (grokdeclarator): Change permerror about 'virtual auto' to error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208792 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>paolo2014-03-212-2/+3
| | | | | | | | * g++.dg/cpp1y/pr60033.C: Use target c++1y. * g++.dg/cpp1y/pr60393.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208753 138bc75d-0d04-0410-961f-82ee72b054a4
* /cppaolo2014-03-211-0/+9
| | | | | | | | | | | | | | | | | 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/60384 * name-lookup.c (push_class_level_binding_1): Check identifier_p on the name argument. /testsuite 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/60384 * g++.dg/cpp1y/pr60384.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208752 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>paolo2014-03-191-0/+6
| | | | | | | | PR c++/60332 * g++.dg/cpp1y/pr60332.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208684 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60390abutcher2014-03-171-0/+26
| | | | | | | | | | | | | | | PR c++/60390 * parser.c (cp_parser_member_declaration): Don't allow finish_fully_implicit_template to consider friend declarations to be class member templates. (synthesize_implicit_template_parm): Handling winding back through class scope to the class being defined in order to inject a template argument list. PR c++/60390 * g++.dg/cpp1y/pr60390.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208625 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60391abutcher2014-03-171-0/+10
| | | | | | | | | | | PR c++/60391 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic function scope as per cp_parser_skip_to_end_of_statement. PR c++/60391 * g++.dg/cpp1y/pr60391.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208624 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60033abutcher2014-03-081-0/+20
| | | | | | | | | | | | PR c++/60033 * pt.c (tsubst_copy): When retrieving a capture pack from a generic lambda, remove the lambda's own template argument list prior to fetching the specialization. PR c++/60033 * g++.dg/cpp1y/pr60033.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208427 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60393abutcher2014-03-081-0/+9
| | | | | | | | | | | | PR c++/60393 * parser.c (cp_parser_parameter_declaration_clause): Move generic function template unwinding on error into a more general location, ... (cp_parser_skip_to_end_of_statement): ... here. PR c++/60393 * g++.dg/cpp1y/pr60393.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208426 138bc75d-0d04-0410-961f-82ee72b054a4
* * lib/g++-dg.exp (g++-dg-runtest): Run tests in C++1y mode, too.jason2014-03-0799-135/+123
| | | | | | | | | | | | | | * 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
* * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y ifjason2014-03-071-1/+1
| | | | | | we're in a trailing return type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208415 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/60409jason2014-03-051-0/+12
| | | | | | | * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a dependent expression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208352 138bc75d-0d04-0410-961f-82ee72b054a4
* /gcc/cppaolo2014-03-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/60376 * parser.c (cp_parser_using_declaration): Early return when cp_parser_nested_name_specifier errors out. /gcc/testsuite 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/60376 * g++.dg/cpp1y/pr60376.C: New. /libstdc++-v3 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/60376 * testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc: Adjust dg-error directives. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208309 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60377.abutcher2014-03-011-0/+9
| | | | | | | | | | | PR c++/60377 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic function scope on parse error in function parameter list. PR c++/60377 * g++.dg/cpp1y/pr60377.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208250 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-02-25 Paolo Carlini <paolo.carlini@oracle.com>paolo2014-02-281-0/+12
| | | | | | | | | | | | | | PR c++/60314 * dwarf2out.c (is_cxx_auto): Handle decltype(auto). /testsuite 2014-02-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/60314 * g++.dg/cpp1y/auto-fn24.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208225 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60311.abutcher2014-02-251-0/+15
| | | | | | | | | | | | | | PR c++/60311 * parser.c (function_being_declared_is_template_p): Return false when processing a template parameter list. (cp_parser_parameter_declaration_clause): Don't set auto_is_implicit_function_template_parm_p when processing a template parameter list. PR c++/60311 * g++.dg/cpp1y/pr60311.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208111 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix out-of-line definition of class template generic member functions.abutcher2014-02-251-0/+35
| | | | | | | | | | * parser.c (synthesize_implicit_template_parm): Inject new template argument list appropriately when a generic member function of a class template is declared out-of-line. * g++.dg/cpp1y/fn-generic-member-ool.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208107 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60065.abutcher2014-02-251-0/+8
| | | | | | | | | | | | | | | | | PR c++/60065 * parser.c (cp_parser_direct_declarator): Don't save and restore num_template_parameter_lists around call to cp_parser_parameter_declaration_list. (function_being_declared_is_template_p): New predicate. (cp_parser_parameter_declaration_list): Use function_being_declared_is_template_p as predicate for inspecting current function template parameter list length rather than num_template_parameter_lists. PR c++/60065 * g++.dg/cpp1y/pr60065.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208106 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/60312jason2014-02-241-0/+16
| | | | | | * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208092 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/60227jason2014-02-211-1/+1
| | | | | | Fix ChangeLog git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208009 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/60277jason2014-02-211-0/+8
| | | | | | * call.c (build_array_conv): Don't crash on VLA. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208001 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/60250jason2014-02-211-0/+7
| | | | | | | * parser.c (cp_parser_direct_declarator): Don't wrap a type-dependent expression in a NOP_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207996 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/60251jason2014-02-211-0/+8
| | | | | | * lambda.c (is_normal_capture_proxy): Handle VLA capture. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207995 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60052 and PR c++/60053.abutcher2014-02-212-0/+30
| | | | | | | | | | | | | | | PR c++/60052 PR c++/60053 * parser.c (cp_parser_parameter_declaration_list): Correctly reset implicit_template_scope upon leaving an out-of-line generic member function definition. PR c++/60052 PR c++/60053 * g++.dg/cpp1y/pr60052.C: New testcase. * g++.dg/cpp1y/pr60053.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207980 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60064.abutcher2014-02-181-0/+21
| | | | | | | | | | | PR c++/60064 * parser.c (cp_parser_member_declaration): Pop fully implicit template scope for generic friend declarations as well as for non-friends. PR c++/60064 * g++.dg/cpp1y/pr60064.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207856 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/60190.abutcher2014-02-181-0/+5
| | | | | | | | | | | | PR c++/60190 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter scope whenever a template parameter list has been started, independent of whether the function call operator was well-formed or not. PR c++/60190 * g++.dg/cpp1y/pr60190.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207852 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>paolo2014-01-291-0/+9
| | | | | | | | | | | | | | | | PR c++/58561 * dwarf2out.c (is_cxx_auto): New. (is_base_type): Use it. (gen_type_die_with_usage): Likewise. /testsuite 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58561 * g++.dg/cpp1y/auto-fn23.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207282 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/53756jason2014-01-282-1/+10
| | | | | | | | | | | | gcc/ * dwarf2out.c (auto_die): New static. (gen_type_die_with_usage): Handle C++1y 'auto'. (gen_subprogram_die): If in-class DIE had 'auto', emit type again on definition. gcc/cp/ * mangle.c (write_unqualified_name): Handle operator auto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207197 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix paths in my previous cp/ChangeLog entries (r206368-r206371) and fix ↵abutcher2014-01-0712-33/+12
| | | | | | layout in cpp1y PR testcases as pointed out by Jakub. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206403 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/59638abutcher2014-01-061-0/+16
| | | | | | | | | | PR c++/59638 * cp/parser.c (cp_parser_init_declarator): Undo fully implicit template parameter list when declarator is not a function. * g++.dg/cpp1y/pr59638.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206371 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/59629abutcher2014-01-061-0/+7
| | | | | | | | | | PR c++/59629 * cp/parser.c (cp_parser_lambda_expression): Save/reset/restore auto_is_implicit_function_template_parm_p around lambda body. * g++.dg/cpp1y/pr59629.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206370 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/59636abutcher2014-01-061-0/+7
| | | | | | | | | | PR c++/59636 * cp/parser.c (cp_parser_template_parameter): Early out with error_mark_node if parameter declaration was not parsed. * g++.dg/cpp1y/pr59636.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206369 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR c++/59635abutcher2014-01-061-0/+9
| | | | | | | | | | PR c++/59635 * cp/lambda.c (maybe_add_lambda_conv_op): Handle marking conversion function as unimplemented for generic lambdas with varargs. * g++.dg/cpp1y/pr59635.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206368 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/59271jason2013-12-241-0/+24
| | | | | | * lambda.c (build_capture_proxy): Use build_cplus_array_type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206193 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/59349jason2013-12-241-0/+6
| | | | | | * parser.c (cp_parser_lambda_introducer): Handle empty init. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206192 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/59111mpolacek2013-12-231-0/+4
| | | | | | | | | | | cp/ * search.c (lookup_conversions): Return NULL_TREE if !CLASS_TYPE_P. testsuite/ * g++.dg/cpp0x/pr59111.C: New test. * g++.dg/cpp1y/pr59110.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206177 138bc75d-0d04-0410-961f-82ee72b054a4
* /cppaolo2013-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-12-05 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (duplicate_decls): Replace pairs of errors and permerrors with error + inform (permerror + inform, respectively). /testsuite 2013-12-05 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp0x/constexpr-46336.C: Adjust expected messages. * g++.dg/cpp0x/defaulted2.C: Likewise. * g++.dg/cpp1y/auto-fn8.C: Likewise. * g++.dg/gomp/udr-3.C: Likewise. * g++.dg/lookup/extern-c-redecl5.C: Likewise. * g++.dg/lookup/linkage1.C: Likewise. * g++.dg/overload/new1.C: Likewise. * g++.dg/parse/friend5.C: Likewise. * g++.dg/parse/namespace-alias-1.C: Likewise. * g++.dg/parse/namespace10.C: Likewise. * g++.dg/parse/redef2.C: Likewise. * g++.dg/template/friend44.C: Likewise. * g++.old-deja/g++.brendan/crash42.C: Likewise. * g++.old-deja/g++.brendan/crash52.C: Likewise. * g++.old-deja/g++.brendan/crash55.C: Likewise. * g++.old-deja/g++.jason/overload21.C: Likewise. * g++.old-deja/g++.jason/overload5.C: Likewise. * g++.old-deja/g++.jason/redecl1.C: Likewise. * g++.old-deja/g++.law/arm8.C: Likewise. * g++.old-deja/g++.other/main1.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205697 138bc75d-0d04-0410-961f-82ee72b054a4
* Disallow implicit function templates in local functions unless defining a ↵abutcher2013-11-253-1/+24
| | | | | | | | | | | | | | | | | | | lambda. gcc/cp/ PR c++/59112 PR c++/59113 * parser.c (cp_parser_parameter_declaration_clause): Disallow implicit function templates in local functions unless defining a lambda. gcc/testsuite/ PR c++/59112 PR c++/59113 g++.dg/cpp1y/pr58533.C: Updated testcase. g++.dg/cpp1y/pr59112.C: New testcase. g++.dg/cpp1y/pr59113.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205343 138bc75d-0d04-0410-961f-82ee72b054a4
* Added testcase for 58533, fixed by rev 204714.abutcher2013-11-141-0/+7
| | | | | | | | gcc/testsuite/ PR c++/58533 * g++.dg/cpp1y/pr58533.C: New testcase (fixed by r204714). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204776 138bc75d-0d04-0410-961f-82ee72b054a4
* Add some generic lambda test cases.abutcher2013-11-129-0/+220
| | | | | | | | | | | | | | | gcc/testsuite/g++.dg/cpp1y/ * lambda-generic.C: New test case. * lambda-generic-cfun.C: New test case. * lambda-generic-dep.C: New test case. * lambda-generic-udt.C: New test case. * lambda-generic-variadic.C: New test case. * lambda-generic-x.C: New test case. * lambda-generic-xcfun.C: New test case. * lambda-generic-xudt.C: New test case. * lambda-generic-mixed.C: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204716 138bc75d-0d04-0410-961f-82ee72b054a4
* Refactor implicit function template implementation and fix 58534, 58536, ↵abutcher2013-11-125-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 58548, 58549 and 58637. gcc/ * tree.c (grow_tree_vec_stat): New function ... * tree.h (grow_tree_vec_stat) (grow_tree_vec): ... and its declaration and macro front-end. gcc/cp/ PR c++/58534 PR c++/58536 PR c++/58548 PR c++/58549 PR c++/58637 * parser.h (struct cp_parser): New members implicit_template_parms, implicit_template_scope and auto_is_implicit_function_template_parm_p. * parser.c (add_implicit_template_parms): Refactor as ... (synthesize_implicit_template_parm): ... this to append a new template type parm to the current template parameter list (introducing a new list if necessary). Removed push_deferring_access_checks. (finish_fully_implicit_template): Removed pop_deferring_access_checks. (cp_parser_new): Initialize new cp_parser members. (cp_parser_parameter_declaration_clause): Consider auto as implicit template parm when parsing a parameter declaration (unless parsing an explicit specialization). (cp_parser_parameter_declaration_list): Remove local implicit_template_parms counter and reset cp_parser implicit template state when complete. (cp_parser_lambda_expression): Reset implicit template cp_parser members whilst generating lambda class. (cp_parser_function_definition_after_declarator): Reset implicit template cp_parser members whilst parsing function definition. (make_generic_type_name): Respell '<autoN>' as 'auto:N' which works better with template diagnostics. (cp_parser_simple_type_specifier): Synthesize implicit template parm on parsing 'auto' if auto_is_implicit_function_template_parm_p and provide diagnostics ... * decl.c (grokdeclarator): ... that were previously done here. gcc/testsuite/g++.dg/ * cpp1y/pr58534.C: New testcase. * cpp1y/pr58536.C: New testcase. * cpp1y/pr58548.C: New testcase. * cpp1y/pr58549.C: New testcase. * cpp1y/pr58637.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204714 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/cp:emsr2013-11-011-0/+60
| | | | | | | | | | | | | | | | | | | | | 2013-11-01 Edward Smith-Rowland <3dw4rd@verizon.net> PR c++/58708 * parser.c (make_string_pack): Discover non-const type and size of character and build parm pack with correct type and chars. gcc/testsuite: 2013-11-01 Edward Smith-Rowland <3dw4rd@verizon.net> PR c++/58708 * g++.dg/cpp1y/pr58708.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204305 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpp:emsr2013-10-313-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++14 digit separators. * include/cpplib.h (cpp_options): Add digit_separators flag. * internal.h (DIGIT_SEP(c)): New macro. * expr.c (cpp_classify_number): Check improper placement of digit sep; (cpp_interpret_integer): Skip over digit separators. * init.c (lang_flags): Add digit_separators flag; (lang_defaults): Add digit separator flags per language; (cpp_set_lang): Set digit_separators * lex.c (lex_number): Add digits separator to allowable characters for C++14. gcc/c-family: 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++14 digit separators. * c-lex.c (interpret_float): Remove digit separators from scratch string before building real literal. gcc/testsuite: 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++14 digit separators. * g++.dg/cpp1y/digit-sep.C: New. * g++.dg/cpp1y/digit-sep-neg.C: New. * g++.dg/cpp1y/digit-sep-cxx11-neg.C: New. libstdc++-v3: 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++14 digit separators. * include/include/bits/parse_numbers.h: Change struct _Digit<_Base, '`'> to struct _Digit<_Base, '\''>. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204260 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud