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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Warning "others choice is redundant" on tagged object initialization Date: Wed, 1 Jun 2016 11:27:17 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <99182741-11ea-4892-96e9-3e086bdb93a1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 1 Jun 2016 18:27:23 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="48b46be33beed75863f69afa437f956b"; logging-data="9836"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+R12UL+2ghnrkCOdJLCRWsC8pqczUcG8Y=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: <99182741-11ea-4892-96e9-3e086bdb93a1@googlegroups.com> Cancel-Lock: sha1:yl7SsrFX+MtPgJFahXimanzIFCU= X-Enigmail-Draft-Status: N1110 Xref: news.eternal-september.org comp.lang.ada:30544 Date: 2016-06-01T11:27:17-07:00 List-Id: On 06/01/2016 11:13 AM, pascal.malaise@gmail.com wrote: > > type Timer_Id is new Smart_Timer_Mng.Handle with null record; > No_Timer : constant Timer_Id > := (Smart_Timer_Mng.Null_Handle with others => <>); > > timers.ads:140:56: warning: others choice is redundant > timers.ads:140:56: warning: previous choices cover all components > > I thought that this was the only way to initialize a sub-object "with null". > Am I missing something? ARM 4.3.2(9) says "If all components of the value of the extension_aggregate are determined by the ancestor_part, then the record_component_association_list is required to be simply null record." So perhaps you should replace "others => <>" with "null record". -- Jeff Carter "In the frozen land of Nador they were forced to eat Robin's minstrels, and there was much rejoicing." Monty Python & the Holy Grail 70