Version 1.2 of ais/ai-00448.txt

Unformatted version of ais/ai-00448.txt version 1.2
Other versions for file ais/ai-00448.txt

!standard 9.06 (11)          06-11-13 AI95-00448/01
!class binding interpretation 06-11-13
!status No Action (7-0-5) 06-11-17
!status work item 06-11-13
!status received 06-11-13
!priority High
!difficulty Easy
!subject Extended range of Year_Number
!summary
The range of Year_Number goes to 2399.
!question
Ada 2005 revises Ada.Calendar to have a larger range of years, and it seems reasonable to allow implementations to provide the Ada 2005 version of the package for use in Ada 95 programs. Technically of course it's an incompatibility, but it's unlikely that many, if any, programs depend on the specific value of the upper bound of Year_Number. Should this change be made to Ada 95? (Yes.)
!recommendation
(See Summary.)
!wording
Replace 9.6(11) by:
subtype Year_Number is Integer range 1901 .. 2399;
!discussion
Having ranges depend on a compiler switch would be complex, and it would only be necessary for this single caase when changing from Ada 95 to Ada 2005. It is better to make the change retroactive.
!ACATS test
Modify an existing ACATS test to allow the new range.
!appendix

From: Gary Dismukes
Sent: Thursday, October 12, 2006  11:48 PM

Ada 2005 revises Ada.Calendar to have a larger range of years, and it
seems reasonable to allow implementations to provide the Ada 2005 version
of the package for use in Ada 95 programs.  I believe that we voted AI-439
(Transitioning to Ada 05) "No Action" with the understanding that we would
still consider library interface changes on a case-by-case basis, and this
seems like the sort of change that merits allowing support for in Ada 95
implementations.  Technically of course it's an incompatibility, but it's
unlikely that many, if any, programs depend on the specific value of the
upper bound of Year_Number.

GNAT provides a switch to allow use of Ada 2005 features, and has a way
to prevent new subprograms added to standard packages from being used
by Ada 95 programs, but GNAT doesn't have a mechanism that would handle
things like the different ranges for subtype Year_Number, and it would
be unfortunate to force implementations to add a special means of dealing
with the difference in subtype ranges.

What do people think about granting this permission?

*************************************************************

From: Tucker Taft
Sent: Friday, October 13, 2006  12:07 AM

OK by me.

*************************************************************

From: Robert Dewar
Sent: Friday, October 13, 2006  2:41 AM

I certainly think it is reasonable, I cannot imagine any significant
incompatibility other than a few ACATS tests which are of no consequence
and easily modified to handle either case.

Given the precedent of allowing Ada 83 compilers to retrofit 8-bit
characters, this seems reasonable to me.

THe consequence of saying no is, at least in the case of GNAT, that
at run time there would be a penalty for both Ada 95 and Ada 2005
mode for a dynamic check on the Ada version, which seems silly (it is
certainly not worth maintaining two versions).

P.S. we found that the calendar changes in Ada 2005 were a major amount
of effort, particularly the leap second changes, and in retrospect I
must say that the fact that every time the astronomer royal decides
to add a leap second we have to make a non-upwards compatibnle change
to the behavior of Calendar seeems unfortunate, but it's done now.

*************************************************************

From: Pascal Leroy
Sent: Friday, October 13, 2006  3:53 AM

Please, the decision is not made by the Astronomer Royal, but by the
Observatoire de Paris, see http://hpiers.obspm.fr/eop-pc/.

*************************************************************

From: Robert Dewar
Sent: Friday, October 13, 2006  4:14 AM

I guess I should have put a smiley, that was a reference to the
Pirate King in G&S Pirates of Penzance:

"For some ridiculous reason, to which however, I've no reason to
be disloyal.

Some person in authority, I don't know whom, very likely the
Astronomer Royal,

Has decided that for such a beastly month as February, twenty-
eight days as a rule are plenty.

One year in four, his days shall be numbered as nine and twenty."

I would attach a WAV file, but that seems a bit TOO far off topic :-)

I promise a nice parody of this for leap seconds :-)

*************************************************************


Questions? Ask the ACAA Technical Agent