public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason_merrill@redhat.com>
To: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
Cc: gcc@gcc.gnu.org, law@cygnus.com, jason_merrill@redhat.com
Subject: Re: Added error message (for too-large array)
Date: Tue, 25 Sep 2001 06:23:00 -0000	[thread overview]
Message-ID: <m3sndbjth3.fsf@prospero.cambridge.redhat.com> (raw)
In-Reply-To: <10109251246.AA10596@vlsi1.ultra.nyu.edu>

>>>>> "Richard" == Richard Kenner <kenner@vlsi1.ultra.nyu.edu> writes:

>     It would think the Ada frontend should set TYPE_SIZE itself for such an
>     ARRAY_TYPE, rather than let the middle-end come up with a meaningless
>     value.

> Why?  There's no meaningful value for it, set by anybody.  All you can do
> with such a type is basically to take a pointer to it or use it to index
> an array.  Any computation that needs the size is incorrect.

OK.  You're saying that an array with an unrepresentable size is valid in
Ada, so my assumption that it would be invalid for all languages was
incorrect.  I suppose I'll move the test into layout_decl, since you seem
to agree that creating an object of such a type is invalid.

> But I still don't understand what motiviated this test.

One of the g++ tests failing with an ICE in assign_stack_temp_for_type on a
16-bit target.  An example that fails on an x86 compiler:

int main ()
{
  double d[1000000000];
}

The C frontend catches this in grokdeclarator, as I mentioned before.

Jason

  reply	other threads:[~2001-09-25  6:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-25  5:41 Richard Kenner
2001-09-25  6:23 ` Jason Merrill [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-09-25  7:05 dewar
2001-09-25  7:05 Richard Kenner
2001-09-25  6:30 dewar
2001-09-25  6:39 ` Jason Merrill
2001-09-11  3:57 Added error message Richard Kenner
2001-09-25  4:52 ` Added error message (for too-large array) Jason Merrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3sndbjth3.fsf@prospero.cambridge.redhat.com \
    --to=jason_merrill@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=kenner@vlsi1.ultra.nyu.edu \
    --cc=law@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).