comp.lang.ada
 help / color / mirror / Atom feed
From: pascal.malaise@gmail.com
Subject: Warning "others choice is redundant" on tagged object initialization
Date: Wed, 1 Jun 2016 11:13:18 -0700 (PDT)
Date: 2016-06-01T11:13:18-07:00	[thread overview]
Message-ID: <99182741-11ea-4892-96e9-3e086bdb93a1@googlegroups.com> (raw)

Gnat GPL 2016 is out... and raises a new warning for me.

Here is the code:
  type Timer_Id is new Smart_Timer_Mng.Handle with null record;
  No_Timer : constant Timer_Id
           := (Smart_Timer_Mng.Null_Handle with others => <>);

And the warning:
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?

Thank you  

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

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