comparison gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 // PR c++/59271
2 // { dg-do compile { target c++14 } }
3 // { dg-options "-Wno-vla" }
4
5 extern "C" int printf (const char *, ...);
6
7 void f(int n)
8 {
9 int a[n];
10
11 for (auto& i : a)
12 {
13 i = &i - a;
14 }
15
16 [&a] (auto m)
17 {
18 for (auto i : a)
19 {
20 printf ("%d", i);
21 }
22
23 return m;
24 };
25 }