From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f6be630961a327bf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-09-10 09:00:12 PST Path: supernews.google.com!sn-xit-02!sn-east!supernews.com!news-feed.riddles.org.uk!newsfeed.direct.ca!look.ca!newsfeed.mathworks.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: C++ to Ada95 -- bitten! Date: Sun, 10 Sep 2000 15:47:33 GMT Organization: Deja.com - Before you buy. Message-ID: <8pgaeg$kps$1@nnrp1.deja.com> References: <6oBu5.666$zo.17816@news1.mts.net> <867l8kelvx.fsf@acm.org> NNTP-Posting-Host: 205.232.38.240 X-Article-Creation-Date: Sun Sep 10 15:47:33 2000 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) X-Http-Proxy: 1.0 x68.deja.com:80 (Squid/1.1.22) for client 205.232.38.240 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:572 Date: 2000-09-10T15:47:33+00:00 List-Id: In article <867l8kelvx.fsf@acm.org>, Laurent Guerby wrote: > "Nick J Chackowsky" writes: > > Ahaaaa... the _compiler_ attempted to "solve" the poorly formed exponent and > > crashed in the attempt? Actually the compiler did not crash, it complained it was out of memory (Storage_Error raised during compilation), and indeed that's likely what is going on, since computing that rather large number absolutely precisely (as required by the standard since it is a static expression), requires a huge amount of memory. GNAT does not particularly try to optimize this kind of case since it is unlikely to occur in correct programs :-) A general note is that if you get a Storage_Error, and you know what caused it (GNAT certainly tells you where you were in the source), then it is worth checking for this case. Even if GNAT were to improve its storage efficiency in handling large expressions, it is always possible (and in fact pretty) easy, to write ones that will require arbitrary amounts of memory (and computing power -- absurd static expressions can also appear to put a compiler into an infinite loop!) Sent via Deja.com http://www.deja.com/ Before you buy.