BOOLEAN_TYPE also counts as integral, so verify_type should allow it.
PR c++/99968
gcc/ChangeLog:
* tree.c (verify_type): Allow enumerator with BOOLEAN_TYPE.
gcc/testsuite/ChangeLog:
* g++.dg/ext/is_enum2.C: New test.
--- /dev/null
+// PR c++/99968
+// { dg-do compile { target c++11 } }
+// { dg-additional-options -g }
+
+template <class T> struct A {
+ using type = T;
+ static const bool value = false;
+};
+
+enum E { e0 = __is_enum(E), e1 = A<E>::value };
error_found = true;
}
if (TREE_CODE (TREE_TYPE (value)) != INTEGER_TYPE
+ && TREE_CODE (TREE_TYPE (value)) != BOOLEAN_TYPE
&& !useless_type_conversion_p (const_cast <tree> (t), TREE_TYPE (value)))
{
error ("enum value type is not %<INTEGER_TYPE%> nor convertible "