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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5d4ade2fd8fd67c6,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!x12g2000yql.googlegroups.com!not-for-mail From: Anh Vo Newsgroups: comp.lang.ada Subject: Legit Warnings or not Date: Wed, 20 Jul 2011 15:30:10 -0700 (PDT) Organization: http://groups.google.com Message-ID: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> NNTP-Posting-Host: 149.32.224.34 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1311201015 9585 127.0.0.1 (20 Jul 2011 22:30:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 20 Jul 2011 22:30:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x12g2000yql.googlegroups.com; posting-host=149.32.224.34; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20251 Date: 2011-07-20T15:30:10-07:00 List-Id: package Warnings_Legit is type Warned_Person (Size : Positive := 10) is -- Warnings issued here record Name : String (1 .. Size); end record; type Acceptable_Person (Size : Positive) is record Name : String (1 .. Size); end record; end Warnings_Legit; The code segment above triggers a warnings message 'creation of "Warned_Person" object may raise Storage_Error' at line 3 as marked. However, no warnings is issued at line 8. The difference between them is default discriminant. I am using GNAT-GPL-2011. Is this warnings legitimate? If yes, why line 8 is OK. Otherwise, should it be a bug? Anh Vo