mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/42266 ([C++0x] ICE with decltype and variadic templates)
PR c++/42266 * cvt.c (convert_from_reference): Do nothing if TREE_TYPE is null. From-SVN: r154964
This commit is contained in:
parent
8414ab1197
commit
4e3f6d8529
|
@ -1,3 +1,8 @@
|
||||||
|
2009-12-03 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/42266
|
||||||
|
* cvt.c (convert_from_reference): Do nothing if TREE_TYPE is null.
|
||||||
|
|
||||||
2009-12-03 Dodji Seketeli <dodji@redhat.com>
|
2009-12-03 Dodji Seketeli <dodji@redhat.com>
|
||||||
|
|
||||||
PR c++/42217
|
PR c++/42217
|
||||||
|
|
|
@ -506,7 +506,8 @@ convert_to_reference (tree reftype, tree expr, int convtype,
|
||||||
tree
|
tree
|
||||||
convert_from_reference (tree val)
|
convert_from_reference (tree val)
|
||||||
{
|
{
|
||||||
if (TREE_CODE (TREE_TYPE (val)) == REFERENCE_TYPE)
|
if (TREE_TYPE (val)
|
||||||
|
&& TREE_CODE (TREE_TYPE (val)) == REFERENCE_TYPE)
|
||||||
{
|
{
|
||||||
tree t = TREE_TYPE (TREE_TYPE (val));
|
tree t = TREE_TYPE (TREE_TYPE (val));
|
||||||
tree ref = build1 (INDIRECT_REF, t, val);
|
tree ref = build1 (INDIRECT_REF, t, val);
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2009-12-03 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/42266
|
||||||
|
* g++.dg/cpp0x/variadic97.C: New.
|
||||||
|
|
||||||
2009-12-03 Jakub Jelinek <jakub@redhat.com>
|
2009-12-03 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR middle-end/42049
|
PR middle-end/42049
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
// PR c++/42266
|
||||||
|
// { dg-options -std=c++0x }
|
||||||
|
|
||||||
|
template<typename... _Elements>
|
||||||
|
class tuple;
|
||||||
|
|
||||||
|
template<typename _Arg>
|
||||||
|
class _Mu;
|
||||||
|
|
||||||
|
template<typename _Signature>
|
||||||
|
struct _Bind;
|
||||||
|
|
||||||
|
template<typename _Functor, typename... _Bound_args>
|
||||||
|
class _Bind<_Functor(_Bound_args...)>
|
||||||
|
{
|
||||||
|
template<typename... _Args, typename
|
||||||
|
= decltype(_Functor()(_Mu<_Bound_args>()(_Bound_args(),
|
||||||
|
tuple<_Args...>())...) )>
|
||||||
|
void __call() { }
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Functor, typename _Arg>
|
||||||
|
_Bind<_Functor(_Arg)>
|
||||||
|
bind(_Functor, _Arg) { }
|
||||||
|
|
||||||
|
struct State
|
||||||
|
{
|
||||||
|
bool ready() { return true; }
|
||||||
|
|
||||||
|
void f()
|
||||||
|
{
|
||||||
|
bind(&State::ready, this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue