comp.lang.ada
 help / color / mirror / Atom feed
* Warning "others choice is redundant" on tagged object initialization
@ 2016-06-01 18:13 pascal.malaise
  2016-06-01 18:27 ` Jeffrey R. Carter
  0 siblings, 1 reply; 3+ messages in thread
From: pascal.malaise @ 2016-06-01 18:13 UTC (permalink / 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  

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-02  5:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-01 18:13 Warning "others choice is redundant" on tagged object initialization pascal.malaise
2016-06-01 18:27 ` Jeffrey R. Carter
2016-06-02  5:14   ` pascal.malaise

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