* decl2.c (grokbitfield): Handle type-dependent width.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170600
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-03-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/46282
+ * decl2.c (grokbitfield): Handle type-dependent width.
+
2011-02-28 Jason Merrill <jason@redhat.com>
PR c++/47873
if (width != error_mark_node)
{
/* The width must be an integer type. */
- if (!INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (TREE_TYPE (width)))
+ if (!type_dependent_expression_p (width)
+ && !INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (TREE_TYPE (width)))
error ("width of bit-field %qD has non-integral type %qT", value,
TREE_TYPE (width));
DECL_INITIAL (value) = width;
+2011-03-01 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/regress/bitfield-err1.C: New.
+
2011-03-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47890
--- /dev/null
+// PR c++/46282
+// { dg-options -std=c++0x }
+
+template<int>
+class A
+{
+ A : i() {} // { dg-message "" }
+ int i;
+};