diff options
author | Jason Merrill <jason@redhat.com> | 2001-10-01 09:18:49 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2001-10-01 09:18:49 -0400 |
commit | 55b3d665057ac473e8a40cd35614fd7896c5c08c (patch) | |
tree | 43d5d70ee06526095ec7d7779d61ac343544b6a3 /gcc/stor-layout.c | |
parent | 173b24b9828c474251cc3bb2515d19399330e8c5 (diff) | |
download | gcc-55b3d665057ac473e8a40cd35614fd7896c5c08c.zip gcc-55b3d665057ac473e8a40cd35614fd7896c5c08c.tar.gz gcc-55b3d665057ac473e8a40cd35614fd7896c5c08c.tar.bz2 |
decl.c (grokdeclarator): Copy array typedef handling from C frontend.
* decl.c (grokdeclarator): Copy array typedef handling from C
frontend.
* decl.c (grokdeclarator): Copy too-large array handling from C
frontend.
* stor-layout.c (layout_type): Don't complain about too-large
array here.
From-SVN: r45923
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 57b839f..3ff8726 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1443,26 +1443,6 @@ layout_type (type) if (TYPE_SIZE_UNIT (element) != 0 && ! integer_onep (element_size)) TYPE_SIZE_UNIT (type) = size_binop (MULT_EXPR, TYPE_SIZE_UNIT (element), length); - - /* Complain if the user has requested an array too large to - fit in size_t. - - ??? Disable this test for signed sizetypes. This has the effect - of disabling it for Ada, where it will cause trouble. However, - this test doesn't make sense for C either since there should - be no problem with a type whose size overflows, only an - object whose size overflows. */ - if (TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST - && TREE_OVERFLOW (TYPE_SIZE (type)) - && TREE_UNSIGNED (TREE_TYPE (TYPE_SIZE (type)))) - { - error ("requested array too large for target"); - - /* Avoid crashing later. */ - TYPE_SIZE (type) = element_size; - if (TYPE_SIZE_UNIT (type)) - TYPE_SIZE_UNIT (type) = TYPE_SIZE_UNIT (element); - } } /* Now round the alignment and size, |