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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c022fc5445abd13d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: Discriminated types with default discriminants References: From: Brian May Date: Fri, 04 Nov 2005 14:27:01 +1100 Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:8QgoN4we8CB9krLhjBkEEdJZ43M= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: snoopy.microcomaustralia.com.au X-Trace: news.melbourne.pipenetworks.com 1131074821 202.173.153.89 (4 Nov 2005 13:27:01 +1000) X-Complaints-To: abuse@pipenetworks.com X-Abuse-Info: Please forward all headers to enable your complaint to be properly processed. Path: g2news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!news.xtra.co.nz!news-south.connect.com.au!duster.adelaide.on.net!news.melbourne.pipenetworks.com!not-for-mail Xref: g2news1.google.com comp.lang.ada:6170 Date: 2005-11-04T14:27:01+11:00 List-Id: >>>>> "Maciej" == Maciej Sobczak writes: Hello, The 2nd warning has already been explained in detail, however I am still confused with the first warning: Maciej> Compiler (GNAT) gives me two warnings: Maciej> 5. Value : String (1..Size); Maciej> | >>>> warning: creation of object of this type may raise Maciej> Storage_Error Why does this warning go away when using an unbounded subtype? Doesn't the issue still exist? Maciej> I can get rid of the first warning with this: Maciej> subtype MyInt is Integer; Maciej> type Discriminated(Size : MyInt := 10) is Maciej> -- ... Thanks -- Brian May