aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/lambda-1.mm
blob: 050d68dff284e5449bb8057c4236dffd3ff2bddc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Contributed by Iain Sandoe <iain@codesourcery.com>, December 2014.  */
// { dg-do compile }
// { dg-options "-std=c++11" }

extern "C" {
  int printf (const char *,...);
}

int main () 
{
  auto f = [] (const char *msg) -> int { printf("%s", msg); return 0; };
  return f("Some test\n");
}