aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-decl.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 54d2fac..9de3adb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index a1fdce7..6d60fd0 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -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);