]> gcc.gnu.org Git - gcc.git/commitdiff
(check_init_type_bitfields): Check for mismatch
authorRichard Stallman <rms@gnu.org>
Fri, 10 Sep 1993 13:49:30 +0000 (13:49 +0000)
committerRichard Stallman <rms@gnu.org>
Fri, 10 Sep 1993 13:49:30 +0000 (13:49 +0000)
between field's mode and its type's mode.

From-SVN: r5304

gcc/c-typeck.c

index 003c302bd0d878317ab58eeb28eec6d90edbc61f..b833bcd63e6741b303f1d41e1bb6d58ddff62e5b 100644 (file)
@@ -5485,7 +5485,9 @@ check_init_type_bitfields (type)
       tree tail;
       for (tail = TYPE_FIELDS (type); tail;
           tail = TREE_CHAIN (tail))
-       if (DECL_BIT_FIELD (tail))
+       if (DECL_BIT_FIELD (tail)
+           /* This catches cases like `int foo : 8;'.  */
+           || DECL_MODE (tail) != TYPE_MODE (TREE_TYPE (tail)))
          {
            constructor_incremental = 0;
            break;
This page took 0.068308 seconds and 5 git commands to generate.