Commit 887a780f by Jason Merrill

re PR c++/50276 ([C++0x] Wrong "used uninitialized in this function" warning)

	PR c++/50276
	* g++.dg/cpp0x/lambda/lambda-template10.C: New.

From-SVN: r196472
parent 731aefac
// PR c++/50276
// { dg-options "-std=c++11 -Wuninitialized" }
// { dg-do run }
template<typename T>
unsigned testfun(const T& func)
{
return func();
}
template<int i>
unsigned test()
{
if (unsigned value = testfun( [] () { return 0; }))
return value;
return i;
}
int main()
{
if (test<42>() != 42)
__builtin_abort ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment