public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5419] c++: Fix cpp0x/lambda/lambda-nested9.C with C++11
@ 2021-11-19 19:59 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2021-11-19 19:59 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b903e0f3adef830c4e2eef79040d213088e7332f

commit r12-5419-gb903e0f3adef830c4e2eef79040d213088e7332f
Author: Marek Polacek <polacek@redhat.com>
Date:   Fri Nov 19 14:54:18 2021 -0500

    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:
---
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C
index ff7da3b0ce1..8f67f225b13 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-19 19:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 19:59 [gcc r12-5419] c++: Fix cpp0x/lambda/lambda-nested9.C with C++11 Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).