mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-22 15:00:55 +08:00
re PR target/37290 (Endless recursion in cse_cc_succs)
PR c++/37290 * pt.c (tsubst) [TYPEOF_TYPE]: Set cp_unevaluated_operand. From-SVN: r154018
This commit is contained in:
parent
f853515499
commit
ecd0e97650
@ -1,5 +1,8 @@
|
||||
2009-11-07 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/37290
|
||||
* pt.c (tsubst) [TYPEOF_TYPE]: Set cp_unevaluated_operand.
|
||||
|
||||
PR c++/18451
|
||||
PR c++/40738
|
||||
* cp-tree.h (cp_decl_specifier_seq): Add any_type_specifiers_p.
|
||||
|
15
gcc/cp/pt.c
15
gcc/cp/pt.c
@ -10220,10 +10220,17 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
|
||||
{
|
||||
tree type;
|
||||
|
||||
type = finish_typeof (tsubst_expr
|
||||
(TYPEOF_TYPE_EXPR (t), args,
|
||||
complain, in_decl,
|
||||
/*integral_constant_expression_p=*/false));
|
||||
++cp_unevaluated_operand;
|
||||
++c_inhibit_evaluation_warnings;
|
||||
|
||||
type = tsubst_expr (TYPEOF_TYPE_EXPR (t), args,
|
||||
complain, in_decl,
|
||||
/*integral_constant_expression_p=*/false);
|
||||
|
||||
--cp_unevaluated_operand;
|
||||
--c_inhibit_evaluation_warnings;
|
||||
|
||||
type = finish_typeof (type);
|
||||
return cp_build_qualified_type_real (type,
|
||||
cp_type_quals (t)
|
||||
| cp_type_quals (type),
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-11-07 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/37290
|
||||
* g++.dg/ext/typeof11.C: New.
|
||||
|
||||
2009-11-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/41985
|
||||
|
18
gcc/testsuite/g++.dg/ext/typeof11.C
Normal file
18
gcc/testsuite/g++.dg/ext/typeof11.C
Normal file
@ -0,0 +1,18 @@
|
||||
// PR c++/37290
|
||||
|
||||
template<typename T> T& ensure_obj(const T&);
|
||||
template <typename T>
|
||||
void func2(T& t)
|
||||
{
|
||||
typedef __typeof__(ensure_obj(t)) ttt;
|
||||
struct ttt1
|
||||
{
|
||||
ttt1( ttt arg0 ){}
|
||||
} tttt ( t );
|
||||
}
|
||||
int main()
|
||||
{
|
||||
double d = 5;
|
||||
func2(d);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user