From: Marek Polacek Date: Fri, 19 Nov 2021 19:54:18 +0000 (-0500) Subject: c++: Fix cpp0x/lambda/lambda-nested9.C with C++11 X-Git-Tag: basepoints/gcc-13~2894 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b903e0f3adef830c4e2eef79040d213088e7332f;p=thirdparty%2Fgcc.git c++: Fix cpp0x/lambda/lambda-nested9.C with C++11 Unfortunately dejagnu doesn't honor #if/#endif, so this test was failing with -std=c++11: FAIL: g++.dg/cpp0x/lambda/lambda-nested9.C -std=c++11 (test for errors, line 37) Fixed thus. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/lambda/lambda-nested9.C: Adjust dg-error. --- diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C index ff7da3b0ce14..8f67f225b135 100644 --- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C @@ -34,7 +34,7 @@ int main() { #if __cpp_init_captures [j=0] () { [&] () mutable { - ++j; // { dg-error "read-only" } + ++j; // { dg-error "read-only" "" { target c++14 } } }; }; #endif