diff options
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 158b3ad0f19..3153cf4e183 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -5811,12 +5811,12 @@ grokdeclarator (const struct c_declarator *declarator, } } - /* Did array size calculations overflow? */ - + /* Did array size calculations overflow or does the array cover more + than half of the address-space? */ if (TREE_CODE (type) == ARRAY_TYPE && COMPLETE_TYPE_P (type) && TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST - && TREE_OVERFLOW (TYPE_SIZE_UNIT (type))) + && ! valid_constant_size_p (TYPE_SIZE_UNIT (type))) { if (name) error_at (loc, "size of array %qE is too large", name); |