comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Leap second support and ARM 9.6.1p89/2
Date: Wed, 6 Aug 2014 23:57:16 -0500
Date: 2014-08-06T23:57:16-05:00	[thread overview]
Message-ID: <lrv0vc$io1$1@loke.gir.dk> (raw)
In-Reply-To: slrnlu2d6u.nrc.lithiumcat@nat.rebma.instinctive.eu

"Natasha Kerensikova" <lithiumcat@instinctive.eu> wrote in message 
news:slrnlu2d6u.nrc.lithiumcat@nat.rebma.instinctive.eu...
...
> I was quite surprised to find that on my platforms (FSF GNAT 4.9.0 on
> FreeBSD and FSF GNAT 4.8.3 on Fedora), the assertion testing Leap_Second
> is raised, which means that Leap_Second is ignored instead of raising an
> exception.
>
> I realize that 9.6.1p89/2 is under "Implementation Advice", so I guess
> that ignoring Leap_Second is allowed by the standard, right?

The definition of Time_Of and Split is what matters here. I don't think it 
was intended that Leap_Second just be ignored. The Implementation Advice 
that you reference just means that it is OK to not support Leap_Seconds at 
all (but in that case, Time_Error ought to be raised by Time_Of).

> Should I still report it as a bug somewhere?

I would. I don't see any permission to ignore the Leap_Seconds flag (as 
opposed to just not supporting it). Perhaps your program ran afoul of 
rounding or something like that, but I'd let your implementer explain.

> Can I just replace "pragma Assert (Leap_Second)" with "return False;" or
> is it even more subtle? I don't see anything about the semantics for
> systems without support for leap seconds, does it means it's undefined
> behavior?

The Implementation Advice is attempting to explain that (the part about 
Split returning False and the other similar points). It shouldn't be 
undefined, because the behavior of Time_Of and the like are defined and 
should be followed regardless of what the target does.

                         Randy.





  reply	other threads:[~2014-08-07  4:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 19:47 Leap second support and ARM 9.6.1p89/2 Natasha Kerensikova
2014-08-07  4:57 ` Randy Brukardt [this message]
2014-08-07  7:35   ` Natasha Kerensikova
2014-08-07  8:59     ` Markus Schöpflin
replies disabled

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