PR c++/35316
* semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
* typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
From-SVN: r134571
+2008-04-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/35316
+ * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
+ to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
+ * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
+
2008-04-22 Jakub Jelinek <jakub@redhat.com>
PR c++/35747
switch (TREE_CODE (expr))
{
case FIELD_DECL:
- if (DECL_C_BIT_FIELD (expr))
+ if (DECL_BIT_FIELD_TYPE (expr))
{
type = DECL_BIT_FIELD_TYPE (expr);
break;
tree field;
field = TREE_OPERAND (exp, 1);
- if (TREE_CODE (field) != FIELD_DECL || !DECL_C_BIT_FIELD (field))
+ if (TREE_CODE (field) != FIELD_DECL || !DECL_BIT_FIELD_TYPE (field))
return NULL_TREE;
if (same_type_ignoring_top_level_qualifiers_p
(TREE_TYPE (exp), DECL_BIT_FIELD_TYPE (field)))
+2008-04-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/35316
+ * g++.dg/cpp0x/decltype11.C: New.
+
2008-04-23 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/36017
--- /dev/null
+// PR c++/35316
+// { dg-options "-std=c++0x" }
+
+template<int> struct A
+{
+ int i : 2;
+
+ void foo()
+ {
+ decltype(i) j;
+ }
+};