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, kenner at vlsi1 dot ultra dot nyu dot edu
- Subject: Re: Added error message (for too-large array)
- From: dewar at gnat dot com
- Date: Tue, 25 Sep 2001 09:29:55 -0400 (EDT)
- Cc: gcc at gcc dot gnu dot org, law at cygnus dot com
<<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.
>>
Actually the idea behavior in Ada would be to generate a Storage_Error
exception at run time if a variable of the type is declared, and to warn
at compile time that this storage error would be generated. After all
the declaration may appear in a conditional piece of code that is never
executed.