Message ID | 50B38DEC.8090004@oracle.com |
---|---|
State | New |
Headers | show |
The patch is OK. To deal with the warning, I would suggest putting the constrained type somewhere other than ENUM_UNDERLYING_TYPE that's shared between enums with fixed and non-fixed underlying types; having it in ENUM_UNDERLYING_TYPE isn't really correct anyway. Jason
Index: decl2.c =================================================================== --- decl2.c (revision 193814) +++ decl2.c (working copy) @@ -1030,7 +1030,7 @@ grokbitfield (const cp_declarator *declarator, if (TREE_CODE (value) == VOID_TYPE) return void_type_node; - if (!INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (TREE_TYPE (value)) + if (!INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (value)) && (POINTER_TYPE_P (value) || !dependent_type_p (TREE_TYPE (value)))) {