+2001-06-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * c-decl.c (grokdeclarator): Use INTEGRAL_TYPE_P.
+
+ * c-typeck.c (c_start_case): Likewise.
+
2001-06-12 Mark Mitchell <mark@codesourcery.com>
* expr.c (store_field): Don't set MEM_ALIAS_SET for a field
/* Strip NON_LVALUE_EXPRs since we aren't using as an lvalue. */
STRIP_TYPE_NOPS (size);
- if (TREE_CODE (TREE_TYPE (size)) != INTEGER_TYPE
- && TREE_CODE (TREE_TYPE (size)) != ENUMERAL_TYPE)
+ if (! INTEGRAL_TYPE_P (TREE_TYPE (size)))
{
error ("size of array `%s' has non-integer type", name);
size = integer_one_node;
code = TREE_CODE (TREE_TYPE (exp));
type = TREE_TYPE (exp);
- if (code != INTEGER_TYPE
- && code != ENUMERAL_TYPE
+ if (! INTEGRAL_TYPE_P (type)
&& code != ERROR_MARK)
{
error ("switch quantity not an integer");
+2001-06-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.c-torture/compile/20010610-1.c: New test.
+
2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.abi/vbase4.C: New test.
--- /dev/null
+/* Origin: Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ Boolean types were not accepted as array sizes nor as switch
+ quantities. */
+
+#include <stdbool.h>
+
+int
+main(void)
+{
+ bool arr[(bool)1];
+
+ switch (arr[0])
+ {
+ default:;
+ }
+
+ return 0;
+}