]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use TYPE_SIZE_UNIT consistently. Last patch was inconsistent.
authorJames E Wilson <wilson@specifixinc.com>
Thu, 18 Aug 2005 00:21:28 +0000 (17:21 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 18 Aug 2005 00:21:28 +0000 (17:21 -0700)
* c-decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE in
array size check.

From-SVN: r103240

gcc/ChangeLog
gcc/c-decl.c

index 54d2fac793fc3a90677f23373f2dae9b9d4d1f80..9de3adb203d4952b85196de488650d6da4156fc3 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-17  James E Wilson  <wilson@specifix.com>
+
+       * c-decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE in
+       array size check.
+
 2005-08-17  David Edelsohn  <edelsohn@gnu.org>
 
        * config/rs6000/rs6000.md (leu<mode>): Convert to mode macro.
index a1fdce776a218e86e59aca52eb04d2685ca89ca5..6d60fd09dc63689faa78e52d356d2a62c8e63022 100644 (file)
@@ -4383,7 +4383,7 @@ grokdeclarator (const struct c_declarator *declarator,
 
   if (TREE_CODE (type) == ARRAY_TYPE
       && COMPLETE_TYPE_P (type)
-      && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
+      && TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST
       && TREE_OVERFLOW (TYPE_SIZE_UNIT (type)))
     {
       error ("size of array %qs is too large", name);