This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Added error message (for too-large array)
- To: jason_merrill at redhat dot com
- Subject: Re: Added error message (for too-large array)
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Tue, 25 Sep 01 10:11:33 EDT
- Cc: gcc at gcc dot gnu dot org
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.
"Unrepresentable" here means "... in the GCC tree". In Ada, all
constants are to be interpreted in infinite precision and the size of
types are likewise. So it's improper to say that some type is too large.
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.
Right. Even in Ada, an implementation is allowed (indeed expected) to
limit the amount of storage that can be allocated to an object.