From: Jakub Jelinek Date: Tue, 27 Sep 2016 19:59:41 +0000 (+0200) Subject: c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for -std=c++1z. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e39060a7f6f58dacf4e74762fd5dd85a5afb0d8;p=gcc.git c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for -std=c++1z. * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for -std=c++1z. * g++.dg/cpp1z/feat-cxx1z.C: Add __cpp_capture_star_this test. From-SVN: r240557 --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index f60f63eee25..d24e9526b44 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,5 +1,8 @@ 2016-09-27 Jakub Jelinek + * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for + -std=c++1z. + * c-ada-spec.c (print_ada_declaration): Remove break after return. 2016-09-26 Thomas Preud'homme diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 6f438117966..b860c21e3e6 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -933,6 +933,7 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_range_based_for=201603"); cpp_define (pfile, "__cpp_constexpr=201603"); cpp_define (pfile, "__cpp_if_constexpr=201606"); + cpp_define (pfile, "__cpp_capture_star_this=201603"); } if (flag_concepts) /* Use a value smaller than the 201507 specified in diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 59e20b7c049..3de855ffde0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 2016-09-27 Jakub Jelinek + * g++.dg/cpp1z/feat-cxx1z.C: Add __cpp_capture_star_this test. + * g++.dg/cpp1z/lambda-this1.C: New test. * g++.dg/cpp1z/lambda-this2.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C index 71c8c7d3768..eeeae45cd73 100644 --- a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C +++ b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C @@ -356,6 +356,12 @@ # error "__cpp_aligned_new != 201606" #endif +#ifndef __cpp_capture_star_this +# error "__cpp_capture_star_this" +#elif __cpp_capture_star_this != 201603 +# error "__cpp_capture_star_this != 201603" +#endif + #ifdef __has_cpp_attribute # if ! __has_cpp_attribute(maybe_unused)