PR c++/66445
* constexpr.c (potential_constant_expression_1): Handle a
DECL_EXPR of TYPE_DECL.
From-SVN: r224382
2015-06-11 Jason Merrill <jason@redhat.com>
+ PR c++/66445
+ * constexpr.c (potential_constant_expression_1): Handle a
+ DECL_EXPR of TYPE_DECL.
+
PR c++/66450
* constexpr.c (cxx_eval_store_expression): Avoid messing up outer
ctx->ctor.
}
return false;
+ case TYPE_DECL:
+ case TAG_DEFN:
+ /* We can see these in statement-expressions. */
+ return true;
+
default:
if (objc_is_property_ref (t))
return false;
--- /dev/null
+// PR c++/66445
+// { dg-options "" }
+
+template <typename> void foo ()
+{
+ int a = ({ struct A{} b; 42; });
+}