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.
{
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),