PR c++/57404
* cp-lang.c (cp_classify_record): Handle structs without
TYPE_LANG_SPECIFIC.
From-SVN: r199456
2013-05-30 Jason Merrill <jason@redhat.com>
+ PR c++/57404
+ * cp-lang.c (cp_classify_record): Handle structs without
+ TYPE_LANG_SPECIFIC.
+
PR c++/52377
* class.c (common_enclosing_class): New.
* cp-tree.h: Declare it.
static enum classify_record
cp_classify_record (tree type)
{
- if (CLASSTYPE_DECLARED_CLASS (type))
+ if (TYPE_LANG_SPECIFIC (type)
+ && CLASSTYPE_DECLARED_CLASS (type))
return RECORD_IS_CLASS;
return RECORD_IS_STRUCT;
--- /dev/null
+// PR c++/57404
+// { dg-options "-std=c++11 -g" }
+
+void f (int i)
+{
+ int a[i];
+ [&a] {};
+}
+
+void g (int i)
+{
+ int a[i];
+ [&a] {} ();
+}