mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/52845 (non-void return type deduced for lambda with empty compound statement)
PR c++/52845 * decl.c (finish_function): Update fntype after deducing return type. From-SVN: r186139
This commit is contained in:
parent
0b9066cf56
commit
6f6e1e9e8b
|
@ -1,3 +1,8 @@
|
||||||
|
2012-04-04 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/52845
|
||||||
|
* decl.c (finish_function): Update fntype after deducing return type.
|
||||||
|
|
||||||
2012-04-03 Jason Merrill <jason@redhat.com>
|
2012-04-03 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
PR c++/52796
|
PR c++/52796
|
||||||
|
|
|
@ -13518,6 +13518,7 @@ finish_function (int flags)
|
||||||
"deduced to %<void%>");
|
"deduced to %<void%>");
|
||||||
}
|
}
|
||||||
apply_deduced_return_type (fndecl, void_type_node);
|
apply_deduced_return_type (fndecl, void_type_node);
|
||||||
|
fntype = TREE_TYPE (fndecl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save constexpr function body before it gets munged by
|
/* Save constexpr function body before it gets munged by
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2012-04-04 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/52845
|
||||||
|
* g++.dg/cpp0x/lambda/lambda-warn4.C: New.
|
||||||
|
|
||||||
2012-04-03 Jason Merrill <jason@redhat.com>
|
2012-04-03 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
PR c++/52796
|
PR c++/52796
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
// PR c++/52845
|
||||||
|
// { dg-options "-std=c++11 -Wall" }
|
||||||
|
|
||||||
|
void f()
|
||||||
|
{
|
||||||
|
[](){};
|
||||||
|
}
|
Loading…
Reference in New Issue