]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cp/typeck.c
Implement P0217R3 - C++17 structured bindings
[thirdparty/gcc.git] / gcc / cp / typeck.c
index 24ca1b52410b85e41b0ed65492ee9458fa48caf7..2d8b7b104406ec53e84319c283d2270283671f24 100644 (file)
@@ -1885,6 +1885,12 @@ is_bitfield_expr_with_lowered_type (const_tree exp)
        return DECL_BIT_FIELD_TYPE (field);
       }
 
+    case VAR_DECL:
+      if (DECL_HAS_VALUE_EXPR_P (exp))
+       return is_bitfield_expr_with_lowered_type (DECL_VALUE_EXPR
+                                                  (CONST_CAST_TREE (exp)));
+      return NULL_TREE;
+
     CASE_CONVERT:
       if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (exp, 0)))
          == TYPE_MAIN_VARIANT (TREE_TYPE (exp)))