comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Warning "others choice is redundant" on tagged object initialization
Date: Wed, 1 Jun 2016 11:27:17 -0700
Date: 2016-06-01T11:27:17-07:00	[thread overview]
Message-ID: <nin9e9$9jc$1@dont-email.me> (raw)
In-Reply-To: <99182741-11ea-4892-96e9-3e086bdb93a1@googlegroups.com>

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


  reply	other threads:[~2016-06-01 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01 18:13 Warning "others choice is redundant" on tagged object initialization pascal.malaise
2016-06-01 18:27 ` Jeffrey R. Carter [this message]
2016-06-02  5:14   ` pascal.malaise
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox