re PR c++/42567 ([C++0x] ICE with auto in type_unification_real, at cp/pt.c:13310)
PR c++/42567 * semantics.c (describable_type): Remove decltype comment and semantics. From-SVN: r155627
This commit is contained in:
parent
5805e48d6c
commit
4b4a42c40a
@ -1,3 +1,9 @@
|
||||
2010-01-04 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/42567
|
||||
* semantics.c (describable_type): Remove decltype comment and
|
||||
semantics.
|
||||
|
||||
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
@ -4690,10 +4690,8 @@ finish_static_assert (tree condition, tree message, location_t location,
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns decltype((EXPR)) for cases where we can drop the decltype and
|
||||
just return the type even though EXPR is a type-dependent expression.
|
||||
The ABI specifies which cases this applies to, which is a subset of the
|
||||
possible cases. */
|
||||
/* Returns the type of EXPR for cases where we can determine it even though
|
||||
EXPR is a type-dependent expression. */
|
||||
|
||||
tree
|
||||
describable_type (tree expr)
|
||||
@ -4717,8 +4715,7 @@ describable_type (tree expr)
|
||||
case PARM_DECL:
|
||||
case RESULT_DECL:
|
||||
case FUNCTION_DECL:
|
||||
/* Named rvalue reference becomes lvalue. */
|
||||
type = build_reference_type (non_reference (TREE_TYPE (expr)));
|
||||
return TREE_TYPE (expr);
|
||||
break;
|
||||
|
||||
case NEW_EXPR:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-01-04 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/42567
|
||||
* g++.dg/cpp0x/auto17.C: New.
|
||||
|
||||
2010-01-04 Rafael Avila de Espindola <espindola@google.com>
|
||||
|
||||
* gcc.dg/lto/20100104_0.c: New.
|
||||
|
10
gcc/testsuite/g++.dg/cpp0x/auto17.C
Normal file
10
gcc/testsuite/g++.dg/cpp0x/auto17.C
Normal file
@ -0,0 +1,10 @@
|
||||
// PR c++/42567
|
||||
// { dg-options "-std=c++0x" }
|
||||
|
||||
template<typename B>
|
||||
struct A {
|
||||
template<typename C>
|
||||
void fn(C c) {
|
||||
auto& key = *c;
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user