International Standard ISO/IEC 8652:1995
Information technology -- Programming languages -- Ada
AMENDMENT 1 (Draft 11)
Technologies de l'information -- Langages de programmation -- Ada
AMENDEMENT 1
Amendment 1 to International Standard ISO/IEC 8652:1995 was
prepared by AXE Consultants.
© 2005, AXE Consultants. All Rights Reserved.
This document may be copied, in whole or in part, in any form or by any
means, as is, or with alterations, provided that (1) alterations are
clearly marked as alterations and (2) this copyright notice is included
unmodified in any copy. Compiled copies of standard library units and
examples need not contain this copyright notice so long as the notice is
included in all copies of the source code and documentation. Any other use
or distribution of this document is prohibited without the prior express
permission of AXE.
Introduction
International Standard ISO/IEC 8652:1995 defines the Ada programming language.
This amendment modifies Ada by making changes and additions that improve:
- The safety of applications written in Ada;
- The portability of applications written in Ada;
- Interoperability with other languages and systems; and
- Accessibility and ease of transition from idioms in other programming
and modeling languages.
This amendment incorporates the following major additions to the International Standard:
- The Ravenscar profile to provide a simplified tasking system for high-integrity systems (see clause D.13);
- A non-preemptive task dispatching policy (see clause D.2.4);
- Aggregates, constructor functions, and constants for limited types (see clauses 4.3.1, 6.5, and 7.5);
- Control of overriding to eliminate errors (see clause 8.3);
- Improvements for access types, such as null excluding subtypes (see clause 3.10), additional uses for anonymous access types (see clauses 3.6 and 8.5.1), and anonymous access-to-subprogram subtypes to support 'downward closures' (see clauses 3.10 and 3.10.2);
- Additional context clause capabilities: limited views to allow mutually dependent types (see clauses 3.10.1 and 10.1.2) and private context clauses that apply only in the private part of a package (see clause 10.1.2);
- Added standard packages, including time management (see 9.6), file directory and name management (see clause A.16), containers (see clause A.17), execution-time clocks (see clause D.14), timing events (see clause D.15), and array and vector operations (see clause G.3);
- Interfaces, to provide a limited form of multiple inheritance of operations (see clause 3.9.4); and
- A mechanism for writing C unions to make interfaces with C systems easier (see clause B.3.3).
This Amendment is organized by sections corresponding to those in the International
Standard. These sections include wording changes and additions to the International
Standard. Clause and subclause headings are given for each clause that contains a
wording change. Clauses and subclauses that do not contain any change or addition
are omitted.
For each change, an anchor paragraph from the International Standard (as corrected
by Technical Corrigendum 1) is given. New or revised text and instructions are
given with each change. The anchor paragraph can be
replaced or deleted, or text can be inserted before or after it. When a heading immediately
precedes the anchor paragraph, any text inserted before the paragraph is intended
to appear under the heading.
Typographical conventions:
Instructions about the text changes are in this font.
The actual text changes are in the same fonts as the International Standard -
this font for text,
this font for syntax,
and this font for Ada source code.
Note that this document is designed to be viewed with the default font as some Roman font,
similar to the Ada 95 standard. This may require some adjustments to your browser.
Disclaimer:
This document is a draft of a possible amendment to Ada 95 (International
Standard ISO/IEC 8652:1995). This draft contains only proposals substantially
approved by the ISO/IEC JTC 1/SC 22/WG 9 Ada Rapporteur Group (ARG). Many
other important proposals are under consideration by the ARG. Neither
the ARG nor any other group has determined which, if any, of these
proposals will be included in the amendment. Any proposal may be
substantially changed or withdrawn before this document begins
standardization, and other proposals may be added. This document is not an
official publication or work product of the ARG.
Forward and Introduction
Introduction
Replace paragraph 3: [AI95-00387-01]
-
Rationale for the Ada Programming Language -- 1995 edition, which
gives an introduction to the new features of Ada, and explains the rationale
behind them. Programmers should read this first.
by:
-
Ada 95 Rationale. This gives an introduction to the new features of
Ada incorporated in the 1995 edition of this Standard, and explains
the rationale behind them. Programmers unfamiliar with Ada 95 should
read this first.
-
Ada 2005 Rationale. This gives an introduction to the changes and new
features in Ada 2005 (compared with the 1995 edition), and explains
the rationale behind them. Programmers should read this rationale
before reading this Standard in depth.
Replace paragraph 5: [AI95-00387-01]
-
The Annotated Ada Reference Manual (AARM). The AARM contains all of
the text in the RM95, plus various annotations. It is intended primarily for
compiler writers, validation test writers, and others who wish to study the
fine details. The annotations include detailed rationale for individual rules
and explanations of some of the more arcane interactions among the rules.
by:
-
The Annotated Ada Reference Manual (AARM). The AARM contains all of
the text in the consolidated Ada Reference Manual, plus various annotations. It
is intended primarily for compiler writers, validation test writers, and others
who wish to study the fine details. The annotations include detailed rationale
for individual rules and explanations of some of the more arcane interactions
among the rules.
Replace paragraph 6: [AI95-00387-01]
Ada was originally designed with three overriding concerns: program reliability
and maintenance, programming as a human activity, and efficiency. This revision
to the language was designed to provide greater flexibility and extensibility,
additional control over storage management and synchronization, and
standardized packages oriented toward supporting important application areas,
while at the same time retaining the original emphasis on reliability,
maintainability, and efficiency.
by:
Ada was originally designed with three overriding concerns: program reliability
and maintenance, programming as a human activity, and efficiency. The 1995
revision to the language was designed to provide greater flexibility and
extensibility, additional control over storage management and synchronization,
and standardized packages oriented toward supporting important application
areas, while at the same time retaining the original emphasis on reliability,
maintainability, and efficiency. This amended version provides further
flexibility and adds more standardized packages within the framework provided
by the 1995 revision.
Replace paragraph 32: [AI95-00285-01; AI95-00387-01]
An enumeration type defines an ordered set of distinct enumeration literals,
for example a list of states or an alphabet of characters. The enumeration
types Boolean, Character, and Wide_Character are predefined.
by:
An enumeration type defines an ordered set of distinct enumeration literals,
for example a list of states or an alphabet of characters. The enumeration
types Boolean, Character, Wide_Character, and Wide_Wide_Character are
predefined.
Replace paragraph 34: [AI95-00285-01; AI95-00387-01]
Composite types allow definitions of structured objects with related
components. The composite types in the language include arrays and records. An
array is an object with indexed components of the same type. A record is an
object with named components of possibly different types. Task and protected
types are also forms of composite types. The array types String and Wide_String
are predefined.
by:
Composite types allow definitions of structured objects with related
components. The composite types in the language include arrays and records. An
array is an object with indexed components of the same type. A record is an
object with named components of possibly different types. Task and protected
types are also forms of composite types. The array types String, Wide_String,
and Wide_Wide_String are predefined.
Insert after paragraph 38: [AI95-00387-01]
From any type a new type may be defined by derivation. A type, together with
its derivatives (both direct and indirect) form a derivation class. Class-wide
operations may be defined that accept as a parameter an operand of any type in
a derivation class. For record and private types, the derivatives may be
extensions of the parent type. Types that support these object-oriented
capabilities of class-wide operations and type extension must be tagged, so
that the specific type of an operand within a derivation class can be
identified at run time. When an operation of a tagged type is applied to an
operand whose specific type is not known until run time, implicit dispatching
is performed based on the tag of the operand.
the new paragraph:
Interface types provide abstract models from which other interfaces and types
may be composed and derived. This provides a reliable form of multiple
inheritance. Interface types may also be implemented by synchronized types
(task types and protected types) thereby enabling concurrent programming and
inheritance to be merged.
Replace paragraph 41: [AI95-00387-01]
Representation clauses can be used to specify the mapping between types and
features of an underlying machine. For example, the user can specify that
objects of a given type must be represented with a given number of bits, or
that the components of a record are to be represented using a given storage
layout. Other features allow the controlled use of low level, nonportable, or
implementation-dependent aspects, including the direct insertion of machine
code.
by:
Aspect clauses can be used to specify the mapping between types and
features of an underlying machine. For example, the user can specify that
objects of a given type must be represented with a given number of bits, or
that the components of a record are to be represented using a given storage
layout. Other features allow the controlled use of low level, nonportable, or
implementation-dependent aspects, including the direct insertion of machine
code.
Replace paragraph 42: [AI95-00387-01]
The predefined environment of the language provides for input-output and other
capabilities (such as string manipulation and random number generation) by
means of standard library packages. Input-output is supported for values of
user-defined as well as of predefined types. Standard means of representing
values in display form are also provided. Other standard library packages are
defined in annexes of the standard to support systems with specialized
requirements.
by:
The predefined environment of the language provides for input-output and other
capabilities by
means of standard library packages. Input-output is supported for values of
user-defined as well as of predefined types. Standard means of representing
values in display form are also provided.
The predefined standard library packages provide facilities such as string
manipulation, containers of various kinds (vectors, lists, maps etc.),
mathematical functions, random number generation, and access to the
execution environment.
The specialized annexes define further predefined library packages and
facilities with emphasis on areas such as real-time scheduling,
interrupt handling, distributed systems, numerical computation, and
high-integrity systems.
Replace paragraph 44: [AI95-00387-01]
This International Standard replaces the first edition of 1987. In this
edition, the following major language changes have been incorporated:
by:
This amended International Standard updates the edition of 1995 which
replaced the first edition of 1987. In the 1995 edition, the following
major language changes were incorporated:
Replace paragraph 45: [AI95-00387-01]
-
Support for standard 8-bit and 16-bit character sets. See Section 2,
3.5.2, 3.6.3, A.1, A.3, and A.4.
by:
-
Support for standard 8-Bit and 16-bit characters was added. See
clauses 2.1, 3.5.2, 3.6.3, A.1, A.3, and A.4.
Replace paragraph 46: [AI95-00387-01]
-
Object-oriented programming with run-time polymorphism. See the
discussions of classes, derived types, tagged types, record extensions, and
private extensions in clauses 3.4, 3.9, and 7.3. See also the new forms of
generic formal parameters that are allowed by 12.5.1, ``Formal Private and
Derived Types'' and 12.7, ``Formal Packages''.
by:
-
The type model was extended to include facilities for object-oriented
programming with dynamic polymorphism. See the discussions of classes, derived
types, tagged types, record extensions, and private extensions in clauses 3.4,
3.9, and 7.3. Additional forms of generic formal parameters were allowed as
described in clauses 12.5.1 and 12.7.
Replace paragraph 47: [AI95-00387-01]
-
Access types have been extended to allow an access value to designate
a subprogram or an object declared by an object declaration (as opposed to just
a heap-allocated object). See 3.10.
by:
-
Access types were extended to allow an access value to designate a
subprogram or an object declared by an object declaration as opposed to
just an object allocated on a heap. See clause 3.10.
Replace paragraph 48: [AI95-00387-01]
-
Efficient data-oriented synchronization is provided via protected
types. See Section 9.
by:
-
Efficient data-oriented synchronization was provided by the
introduction of protected types. See clause 9.4.
Replace paragraph 49: [AI95-00387-01]
-
The library units of a library may be organized into a hierarchy of
parent and child units. See Section 10.
by:
-
The library structure was extended to allow library units to be
organized into a hierarchy of parent and child units. See clause 10.1.
Replace paragraph 50: [AI95-00387-01]
-
Additional support has been added for interfacing to other languages.
See Annex B.
by:
-
Additional support was added for interfacing to other languages.
See Annex B.
Replace paragraph 51: [AI95-00387-01]
-
The Specialized Needs Annexes have been added to provide specific
support for certain application areas:
by:
-
The Specialized Needs Annexes were added to provide specific support
for certain application areas:
Replace paragraph 57: [AI95-00387-01]
-
Annex H, ``Safety and Security''
by:
-
Annex H, ``High Integrity Systems''
Amendment 1 modifies the 1995 International Standard by making changes and
additions that improve the capability of the language and the reliability of
programs written in the language. In particular the changes were designed to
improve the portability of programs, interfacing to other languages, and
both the object-oriented and real-time capabilities.
The following significant changes with respect to the 1995 edition are
incorporated:
-
Support for program text is extended to cover the entire ISO/IEC
10646:2003 repertoire. Execution support now includes the 32-bit character
set. See clauses 2.1, 3.5, 3.6, A.1, A.3, and A.4.
-
The object-oriented model has been improved by the addition of an
interface facility which provides multiple inheritance and additional
flexibility for type extensions. See clauses 3.4, 3.9, and 7.3. An
alternative notation for calling operations more akin to that used in
other languages has also been added. See clause 4.1.3.
-
Access types have been further extended to unify properties such as
the ability to access constants and to exclude null values. See clause
3.10. Anonymous access types are now permitted more freely and anonymous
access-to-subprogram types are introduced. See clauses 3.3, 3.6, 3.10, and
8.5.1.
-
The control of structure and visibility has been enhanced to
permit mutually dependent references between units and finer control
over access from the private part of a package. See clauses 3.10.1 and
10.1.2. In addition, limited types have been made more useful by the
provision of aggregates, constants, and constructor functions. See clauses
4.3, 6.5, and 7.5.
-
The predefined environment has been extended to include additional time
and calendar operations, improved string handling, a comprehensive
container library, file and directory management, and access to
environment variables. See clauses 9.6.1, A.4, A.16, A.17, and A.18.
-
Two of the Specialized Needs Annexes have been considerably enhanced:
-
The Real-Time Systems Annex now includes the Ravenscar profile for
high-integrity systems, further dispatching policies such as Round Robin
and Earliest Deadline First, support for timing events, and support for
control of CPU time utilization. See clauses D.2, D.13, D.14, and D.15.
-
The Numerics Annex now includes support for real and complex vectors
and matrices as previously defined in ISO/IEC 13813:1997 plus further basic
operations for linear algebra. See clause G.3.
-
The overall reliability of the language has been enhanced by a number
of improvements. These include new syntax which detects accidental overloading,
as well as pragmas for making assertions and giving better control over the
suppression of checks. See clauses 6.1, 11.4.2, and 11.5.
Section 1: General
1.1.2 Structure
Replace paragraph 13: [AI95-00347-01]
-
Annex H, ``Safety and Security''
by:
-
Annex H, ``High Integrity Systems''
1.1.4 Method of Description and Syntax Notation
Insert after paragraph 14: [AI95-00285-01]
-
If the name of any syntactic category starts with an italicized part,
it is equivalent to the category name without the italicized part. The
italicized part is intended to convey some semantic information. For example
subtype_name and task_name are both equivalent to name alone.
the new paragraph:
The delimiters, compound delimiters, reserved words, and numeric_literals
are exclusively made of the characters whose code position is between
16#20# and 16#7E#, inclusively. The special characters for which names
are defined in this International Standard (see 2.1) belong to the same
range. For example, the character E in the definition of exponent is the
character whose name is "LATIN CAPITAL LETTER E", not "GREEK CAPITAL
LETTER EPSILON".
Insert before paragraph 15: [AI95-00395-01]
A syntactic category is a nonterminal in the grammar defined in BNF under
"Syntax." Names of syntactic categories are set in a different font,
like_this.
the new paragraph:
When this International Standard mentions the conversion of some character or
sequence of characters to upper case, it means the character or sequence of
characters obtained by using locale-independent full case folding, as defined
by documents referenced in the note in section 1 of ISO/IEC 10646:2003.
1.2 Normative References
Replace paragraph 3: [AI95-00415-01]
ISO/IEC 1539:1991, Information technology -- Programming languages -- FORTRAN.
by:
ISO/IEC 1539:2004, Information technology -- Programming languages --
Fortran -- Part 1: Base language.
Replace paragraph 4: [AI95-00415-01]
ISO 1989:1985, Programming languages -- COBOL.
by:
ISO/IEC 1989:2002, Programming languages -- COBOL.
Insert after paragraph 5: [AI95-00351-01]
ISO/IEC 6429:1992, Information technology - Control functions for coded
graphic character sets.
the new paragraph:
ISO 8601:2004, Data elements and interchange formats - Information
interchange - Representation of dates and times.
Replace paragraph 7: [AI95-00415-01]
ISO/IEC 9899:1990, Programming languages -- C.
by:
ISO/IEC 9899:1999, Programming languages -- C,
supplemented by Technical Corrigendum 1:2001 and Technical Corrigendum 2:2004.
Replace paragraph 8: [AI95-00285-01; AI95-00376-01]
ISO/IEC 10646-1:1993, Information technology - Universal Multiple-Octet Coded
Character Set (UCS) - Part 1: Architecture and Basic Multilingual Plane,
supplemented by Technical Corrigendum 1:1996.
by:
ISO/IEC 10646:2003, Information technology - Universal Multiple-Octet
Coded Character Set (UCS).
ISO/IEC 14882:2003, Information technology - Programming languages - C++.
ISO/IEC TR 19769:2004, Information technology - Programming Languages,
their environments and system software inferfaces - Extensions for the
programming language C to support new character data types.
1.3 Definitions
Replace paragraph 1: [AI95-00415-01]
Terms are defined throughout this International Standard, indicated by
italic type. Terms explicitly defined in this International Standard are
not to be presumed to refer implicitly to similar terms defined elsewhere.
Terms not defined in this International Standard are to be interpreted
according to the Webster's Third New International Dictionary of the English
Language. Informal descriptions of some terms are also given in Annex N,
"Glossary".
by:
Terms are defined throughout this International Standard, indicated by
italic type. Terms explicitly defined in this International Standard are
not to be presumed to refer implicitly to similar terms defined elsewhere.
Mathematical terms not defined in this International Standard are to be
interpreted according to the CRC Concise Encyclopedia of Mathematics,
Second Edition. Other terms not defined in this International Standard are to
be interpreted according to the Webster's Third New International Dictionary
of the English Language. Informal descriptions of some terms are also given in
Annex N, "Glossary".
Section 2: Lexical Elements
2.1 Character Set
Replace paragraph 1: [AI95-00285-01; AI95-00395-01]
The only characters allowed outside of comments are the
graphic_characters and format_effectors.
by:
The character repertoire for the text of an Ada program consists of the
collection of characters described by the ISO/IEC 10646:2003 Universal
Multiple-Octet Coded Character Set. This collection is organized in planes,
each plane comprising 65536 characters.
Delete paragraph 2: [AI95-00285-01]
character ::= graphic_character | format_effector | other_control_function
Replace paragraph 3: [AI95-00285-01; AI95-00395-01]
graphic_character ::= identifier_letter | digit | space_character | special_character
by:
A character is any character defined within ISO/IEC 10646:2003
other than those whose relative code position in their plane is 16#FFFE# or
16#FFFF#.
Replace paragraph 4: [AI95-00285-01; AI95-00395-01]
The character repertoire for the text of an Ada program consists of the
collection of characters called the Basic Multilingual Plane (BMP) of the ISO
10646 Universal Multiple-Octet Coded Character Set, plus a set of
format_effectors and, in comments only, a set of
other_control_functions; the coded representation for these characters is
implementation defined (it need not be a representation defined within
ISO-10646-1).
by:
The coded representation for characters is implementation defined (it need not
be a representation defined within ISO/IEC 10646:2003). A character whose
relative code position in its plane is 16#FFFE# or 16#FFFF# is not allowed
anywhere in the text of a program.
The semantics of an Ada program whose text is not in Normalization Form KC (as
defined by section 24 of ISO/IEC 10646:2003) is implementation defined.
Replace paragraph 5: [AI95-00285-01]
The description of the language definition in this International Standard uses
the graphic symbols defined for Row 00: Basic Latin and Row 00: Latin-1
Supplement of the ISO 10646 BMP; these correspond to the graphic symbols of ISO
8859-1 (Latin-1); no graphic symbols are used in this International Standard
for characters outside of Row 00 of the BMP. The actual set of graphic symbols
used by an implementation for the visual representation of the text of an Ada
program is not specified.
by:
The description of the language definition in this International Standard uses
the character properties General Category, Simple Uppercase Mapping, Uppercase
Mapping, and Special Case Condition of the documents referenced by the note in
section 1 of ISO/IEC 10646:2003. The actual set of graphic symbols used by an
implementation for the visual representation of the text of an Ada program is
not specified.
Replace paragraph 6: [AI95-00285-01]
The categories of characters are defined as follows:
by:
Characters are categorized as follows:
Delete paragraph 7: [AI95-00285-01]
- identifier_letter
-
upper_case_identifier_letter | lower_case_identifier_letter
Replace paragraph 8: [AI95-00285-01]
- upper_case_identifier_letter
-
Any character of Row 00 of ISO 10646 BMP whose name begins ``Latin Capital Letter''.
by:
- letter_uppercase
-
Any character whose General Category is defined to be "Letter, Uppercase".
Replace paragraph 9: [AI95-00285-01]
- lower_case_identifier_letter
-
Any character of Row 00 of ISO 10646 BMP whose name begins ``Latin Small Letter''.
by:
- letter_lowercase
-
Any character whose General Category is defined to be "Letter, Lowercase".
- letter_titlecase
-
Any character whose General Category is defined to be "Letter, Titlecase".
- letter_modifier
-
Any character whose General Category is defined to be "Letter, Modifier".
- letter_other
-
Any character whose General Category is defined to be "Letter, Other".
- mark_non_spacing
-
Any character whose General Category is defined to be "Mark, Non-Spacing".
- mark_spacing_combining
-
Any character whose General Category is defined to be "Mark, Spacing Combining".
Replace paragraph 10: [AI95-00285-01]
- digit
-
One of the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9.
by:
- number_decimal_digit
-
Any character whose General Category is defined to be "Number, Decimal Digit".
- number_letter
-
Any character whose General Category is defined to be "Number, Letter".
Replace paragraph 11: [AI95-00285-01]
- space_character
-
The character of ISO 10646 BMP named ``Space''.
by:
- separator_space
-
Any character whose General Category is defined to be "Separator, Space".
Replace paragraph 12: [AI95-00285-01]
- special_character
-
Any character of the ISO 10646 BMP that is not reserved for a control function,
and is not the space_character, an identifier_letter, or a
digit.
by:
- separator_line
-
Any character whose General Category is defined to be "Separator, Line".
- separator_paragraph
-
Any character whose General Category is defined to be "Separator, Paragraph".
Replace paragraph 13: [AI95-00285-01]
- format_effector
-
The control functions of ISO 6429 called character tabulation (HT), line
tabulation (VT), carriage return (CR), line feed (LF), and form feed (FF).
by:
- format_effector
-
The characters whose code positions are 16#09# (CHARACTER TABULATION), 16#0A#
(LINE FEED(LF)), 16#0B# (LINE TABULATION), 16#0C# (FORM FEED(FF)), 16#0D#
(CARRIAGE RETURN(CR)), 16#85# (NEXT LINE(NEL)), and the characters in
categories separator_line and separator_paragraph. The names
mentioned in parentheses in this list are not defined by ISO/IEC 10646:2003;
they are only used for convenience in this International Standard.
- other_control
-
Any character whose General Category is defined to be "Other, Control", and
which is not defined to be a format_effector.
- other_format
-
Any character whose General Category is defined to be "Other, Format".
- other_private_use
-
Any character whose General Category is defined to be "Other, Private Use".
- other_surrogate
-
Any character whose General Category is defined to be "Other, Surrogate".
- punctuation_connector
-
Any character whose General Category is defined to be "Punctuation, Connector".
Replace paragraph 14: [AI95-00285-01; AI95-00395-01]
- other_control_function
-
Any control function, other than a format_effector, that is allowed in a
comment; the set of other_control_functions allowed in comments is
implementation defined.
by:
- graphic_character
-
Any character which is not in the categories other_control,
other_private_use, other_surrogate, format_effector, and whose
relative code position in its plane is neither 16#FFFE# nor 16#FFFF#.
Replace paragraph 15: [AI95-00285-01]
The following names are used when referring to certain special_characters:
by:
The following names are used when referring to certain characters (the first
name is that given in ISO/IEC 10646:2003):
Delete paragraph 16: [AI95-00285-01]
In a nonstandard mode, the implementation may support a different character
repertoire; in particular, the set of characters that are considered
identifier_letters can be extended or changed to conform to local
conventions.
Replace paragraph 17: [AI95-00285-01]
1 Every code position of ISO 10646 BMP that is not reserved for a
control function is defined to be a graphic_character by this International
Standard. This includes all code positions other than 0000 - 001F, 007F -
009F, and FFFE - FFFF.
by:
1 The characters in categories other_control,
other_private_use, and other_surrogate are only allowed in comments.
2.2 Lexical Elements, Separators, and Delimiters
Replace paragraph 2: [AI95-00285-01]
The text of a compilation is divided into lines.
In general, the representation for an end of line is implementation defined.
However, a sequence of one or more format_effectors other
than character tabulation (HT) signifies at least one end of line.
by:
The text of a compilation is divided into lines.
In general, the representation for an end of line is implementation defined.
However, a sequence of one or more format_effectors other
than the character whose code position
is 16#09# (CHARACTER TABULATION) signifies at least one end of line.
Replace paragraph 3: [AI95-00285-01]
In some cases an explicit separator is required to separate adjacent
lexical elements. A separator is any of a space character, a format effector,
or the end of a line, as follows:
by:
In some cases an explicit separator is required to separate adjacent
lexical elements. A separator is any of a separator_space, a
format_effector or the end of a line, as follows:
Replace paragraph 4: [AI95-00285-01]
-
A space character is a separator except within a comment,
a string_literal, or a character_literal.
by:
-
A separator_space is a separator except within a comment, a
string_literal, or a character_literal.
Replace paragraph 5: [AI95-00285-01]
-
Character tabulation (HT) is a separator except within a comment.
by:
-
The character whose code position is 16#09# (CHARACTER TABULATION)
is a separator except within a comment.
Replace paragraph 8: [AI95-00285-01]
A delimiter is either one of the following special characters:
by:
A delimiter is either one of the following characters:
2.3 Identifiers
Replace paragraph 2: [AI95-00285-01; AI95-00395-01]
identifier ::=
identifier_letter {[underline] letter_or_digit}
by:
identifier ::=
identifier_start {identifier_start | identifier_extend}
Replace paragraph 3: [AI95-00285-01; AI95-00395-01]
letter_or_digit ::= identifier_letter | digit
by:
identifier_start ::=
letter_uppercase
| letter_lowercase
| letter_titlecase
| letter_modifier
| letter_other
| number_letter
identifier_extend ::=
mark_non_spacing
| mark_spacing_combining
| number_decimal_digit
| punctuation_connector
| other_format
Replace paragraph 4: [AI95-00395-01]
An identifier shall not be a reserved word.
by:
After eliminating the characters in category other_format, an
identifier shall not contain two consecutive characters in category
punctuation_connector, or end with a character in that category.
Replace paragraph 5: [AI95-00285-01; AI95-00395-01]
All characters of an identifier are significant, including any underline
character. Identifiers differing only in the use of corresponding upper
and lower case letters are considered the same.
by:
Two identifiers are considered the same if they consist of the same
sequence of characters after applying the following transformations (in
this order):
-
The characters in category other_format are eliminated.
-
The remaining sequence of characters is converted to upper case.
Replace paragraph 6: [AI95-00285-01; AI95-00395-01]
In a nonstandard mode, an implementation may support other upper/lower case
equivalence rules for identifiers, to accommodate local conventions.
by:
After applying these transformations, an identifier shall not be identical to a
reserved word (in upper case).
In a nonstandard mode, an implementation may support other upper/lower case
equivalence rules for identifiers, to accommodate local conventions.
NOTES
3 Identifiers differing only in the use of corresponding upper and
lower case letters are considered the same.
2.4.1 Decimal Literals
Insert after paragraph 5: [AI95-00285-01]
exponent ::= E [+] numeral | E - numeral
the new paragraph:
digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
2.6 String Literals
Insert after paragraph 7: [AI95-00285-01]
NOTES
6 An end of line cannot appear in a string_literal.
the new paragraph:
7 No transformation is performed on the sequence of
characters in a string_literal.
2.9 Reserved Words
In paragraph 2 replace: [AI95-00284-02; AI95-00395-01]
The following are the reserved words (ignoring upper/lower case distinctions):
by:
The following are the reserved words. Within a program, some or all of the
letters of a reserved word may be in upper case, and one or more characters in
category other_format may be inserted within or at the end of the reserved
word.
In the list in paragraph 2, add: [AI95-00284-02; AI95-00395-01]
interface
overriding
synchronized
Section 3: Declarations and Types
3.1 Declarations
Replace paragraph 3: [AI95-00348-01]
basic_declaration ::=
type_declaration | subtype_declaration
| object_declaration | number_declaration
| subprogram_declaration | abstract_subprogram_declaration
| package_declaration | renaming_declaration
| exception_declaration | generic_declaration
| generic_instantiation
by:
basic_declaration ::=
type_declaration | subtype_declaration
| object_declaration | number_declaration
| subprogram_declaration | abstract_subprogram_declaration
| null_procedure_declaration | package_declaration
| renaming_declaration | exception_declaration
| generic_declaration | generic_instantiation
3.2 Types and Subtypes
Replace paragraph 4: [AI95-00326-01]
The composite types are the record types, record extensions, array
types, task types, and protected types. A private type or
private extension represents a partial view (see 7.3) of a type, providing
support for data abstraction. A partial view is a composite type.
by:
The composite types are the record types, record extensions, array
types, task types, and protected types.
There can be multiple views of a type with varying sets of operations. An
incomplete type represents an incomplete view (see 3.10.1) of a type with a
very restricted usage, providing support for recursive data structures. A
private type or private extension represents a partial view (see 7.3)
of a type, providing support for data abstraction. The full view (see 3.2.1) of
a type represents its complete definition. An incomplete or partial view is
considered a composite type, even if the full view is not.
Replace paragraph 5: [AI95-00326-01]
Certain composite types (and partial views thereof) have special components
called discriminants whose values affect the presence, constraints, or
initialization of other components. Discriminants can be thought of as
parameters of the type.
by:
Certain composite types (and views thereof) have special components
called discriminants whose values affect the presence, constraints, or
initialization of other components. Discriminants can be thought of as
parameters of the type.
Replace paragraph 6: [AI95-00366-01]
The term subcomponent is used in this International Standard in place of
the term component to indicate either a component, or a component of another
subcomponent. Where other subcomponents are excluded, the term component is
used instead. Similarly, a part of an object or value is used to mean the
whole object or value, or any set of its subcomponents.
by:
The term subcomponent is used in this International Standard in place of
the term component to indicate either a component, or a component of another
subcomponent. Where other subcomponents are excluded, the term component is
used instead. Similarly, a part of an object or value is used to mean the
whole object or value, or any set of its subcomponents.
The terms component, subcomponent, and part are also applied to a type
meaning the component, subcomponent, or part of objects and values of the type.
Replace paragraph 7: [AI95-00231-01]
The set of possible values for an object of a given type can be subjected to a
condition that is called a constraint (the case of a null
constraint that specifies no restriction is also included); the rules for
which values satisfy a given kind of constraint are given in 3.5 for
range_constraints, 3.6.1 for index_constraints, and 3.7.1 for
discriminant_constraints.
by:
The set of possible values for an object of a given type can be subjected to a
condition that is called a constraint (the case of a null
constraint that specifies no restriction is also included); the rules for
which values satisfy a given kind of constraint are given in 3.5 for
range_constraints, 3.6.1 for index_constraints, and 3.7.1 for
discriminant_constraints. The set of possible values for an object of an
access type can also be subjected to a condition that is called a null
exclusion (see 3.10).
Replace paragraph 8: [AI95-00231-01; AI95-00415-01]
A subtype of a given type is a combination of the type,
a constraint on values of the type, and certain
attributes specific to the subtype.
The given type is called the type of the subtype.
Similarly, the associated constraint is called the
constraint of the subtype. The set of values
of a subtype consists of the values of its type
that satisfy its constraint.
Such values belong to the subtype.
by:
A subtype of a given type is a combination of the type,
a constraint on values of the type, and certain
attributes specific to the subtype.
The given type is called the type of the subtype.
Similarly, the associated constraint is called the
constraint of the subtype. The set of values
of a subtype consists of the values of its type
that satisfy its constraint and, in the case
of a subtype of an access type, any applicable null exclusion.
Such values belong to the subtype.
3.2.1 Type Declarations
Replace paragraph 4: [AI95-00251-01]
type_definition ::=
enumeration_type_definition | integer_type_definition
| real_type_definition | array_type_definition
| record_type_definition | access_type_definition
| derived_type_definition
by:
type_definition ::=
enumeration_type_definition | integer_type_definition
| real_type_definition | array_type_definition
| record_type_definition | access_type_definition
| derived_type_definition | interface_type_definition
Replace paragraph 7: [AI95-00230-01]
A type defined by a type_declaration is a named type;
such a type has one or more nameable subtypes.
Certain other forms of declaration also include type
definitions as part of the declaration for an object (including a
parameter or a discriminant). The type defined by such
a declaration is anonymous - it has no nameable subtypes.
For explanatory purposes, this International Standard sometimes refers to
an anonymous type by a pseudo-name, written in italics, and
uses such pseudo-names at places where the syntax normally requires
an identifier. For a named type whose first subtype is T,
this International Standard sometimes refers to the type of T
as simply "the type T."
by:
A type defined by a type_declaration is a named type;
such a type has one or more nameable subtypes.
Certain other forms of declaration also include type
definitions as part of the declaration for an object. The type defined
by such a declaration is anonymous - it has no nameable subtypes.
For explanatory purposes, this International Standard sometimes refers to
an anonymous type by a pseudo-name, written in italics, and
uses such pseudo-names at places where the syntax normally requires
an identifier. For a named type whose first subtype is T,
this International Standard sometimes refers to the type of T
as simply "the type T."
Replace paragraph 8: [AI95-00230-01; AI95-00326-01]
A named type that is declared by a full_type_declaration, or an anonymous
type that is defined as part of declaring an object of the type, is called a
full type. The type_definition, task_definition,
protected_definition, or access_definition that defines a full type
is called a full type definition. Types declared by other forms of
type_declaration are not separate types; they are partial or incomplete
views of some full type.
by:
A named type that is declared by a full_type_declaration, or an anonymous
type that is defined by an access_definition or as part of declaring
an object of the type, is called a full type. The declaration of a
full type also declares the full view of the type. The
type_definition, task_definition, protected_definition, or
access_definition that defines a full type is called a full type
definition. Types declared by other forms of type_declaration are not
separate types; they are partial or incomplete views of some full type.
3.2.2 Subtype Declarations
Replace paragraph 3: [AI95-00231-01]
subtype_indication ::= subtype_mark [constraint]
by:
subtype_indication ::= [null_exclusion] subtype_mark [constraint]
3.2.3 Classification of Operations
Replace paragraph 1: [AI95-00416-01]
An operation operates on a type T if it yields a value of type T, if it
has an operand whose expected type (see 8.6) is T, or if it has an access
parameter (see 6.1) designating T. A predefined operator, or other
language-defined operation such as assignment or a membership test, that
operates on a type, is called a predefined operation of the type. The
primitive operations of a type are the predefined operations of the type,
plus any user-defined primitive subprograms.
by:
An operation operates on a type T if it yields a value of type T, if it
has an operand whose expected type (see 8.6) is T, or if it has an access
parameter or access result type (see 6.1) designating T. A predefined
operator, or other language-defined operation such as assignment or a
membership test, that operates on a type, is called a predefined operation
of the type. The primitive operations of a type are the predefined
operations of the type, plus any user-defined primitive subprograms.
Insert after paragraph 6: [AI95-00335-01]
-
For a specific type declared immediately within a
package_specification, any subprograms (in addition to the enumeration
literals) that are explicitly declared immediately within the same
package_specification and that operate on the type;
the new paragraph:
-
For a specific type, the stream-oriented attributes of the type that
are available (see 13.13.2) at the end of the list of declarative_items
where the type is declared;
Replace paragraph 7: [AI95-00200-01]
-
Any subprograms not covered above that are explicitly declared
immediately within the same declarative region as the type and that override
(see 8.3) other implicitly declared primitive subprograms of the type.
by:
-
In the case of a nonformal type, any subprograms not covered above
that are explicitly declared immediately within the same declarative region as
the type and that override (see 8.3) other implicitly declared primitive
subprograms of the type.
3.3.1 Object Declarations
Replace paragraph 2: [AI95-00385-01; AI95-00406-01]
object_declaration ::=
defining_identifier_list : [aliased] [constant] subtype_indication [:= expression]
| defining_identifier_list : [aliased] [constant] array_type_definition [:= expression]
| single_task_declaration
| single_protected_declaration
by:
object_declaration ::=
defining_identifier_list : [aliased] [constant] subtype_indication [:= expression]
| defining_identifier_list : [aliased] [constant] access_definition [:= expression]
| defining_identifier_list : [aliased] [constant] array_type_definition [:= expression]
| single_task_declaration
| single_protected_declaration
Replace paragraph 5: [AI95-00287-01]
An object_declaration without the reserved word constant declares a
variable object. If it has a subtype_indication or an
array_type_definition that defines an indefinite subtype, then there shall
be an initialization expression. An initialization expression shall not be
given if the object is of a limited type.
by:
An object_declaration without the reserved word constant declares a
variable object. If it has a subtype_indication or an
array_type_definition that defines an indefinite subtype, then there shall
be an initialization expression.
Replace paragraph 8: [AI95-00373-01; AI95-00385-01]
The subtype_indication or full type definition of an
object_declaration defines the nominal subtype of the object.
The object_declaration declares an object of the nominal subtype.
by:
The subtype_indication, access_definition, or full type
definition of an object_declaration defines the nominal subtype
of the object.
The object_declaration declares an object of the nominal subtype.
A component of an object is said to require late initialization
if it has an access discriminant value constrained by a per-object
expression, or if it has an initialization expression which includes a name
denoting the current instance of the type or denoting an access discriminant.
Replace paragraph 9: [AI95-00363-01]
If a composite object declared by an object_declaration has an
unconstrained nominal subtype, then if this subtype is indefinite or the object
is constant or aliased (see 3.10) the actual subtype of this object is
constrained. The constraint is determined by the bounds or discriminants (if
any) of its initial value; the object is said to be constrained by its
initial value. In the case of an aliased object, this initial value may be
either explicit or implicit; in the other cases, an explicit initial value is
required. When not constrained by its initial value, the actual and nominal
subtypes of the object are the same. If its actual subtype is constrained, the
object is called a constrained object.
by:
If a composite object declared by an object_declaration has an
unconstrained nominal subtype, then if this subtype is indefinite or the object
is constant the actual subtype of this object is constrained. The constraint is
determined by the bounds or discriminants (if any) of its initial value; the
object is said to be constrained by its initial value. When not constrained
by its initial value, the actual and nominal subtypes of the object are the
same. If its actual subtype is constrained, the object is called a
constrained object.
Replace paragraph 16: [AI95-00385-01]
- 1.
- The subtype_indication,
array_type_definition, single_task_declaration, or
single_protected_declaration is first elaborated.
This creates the nominal subtype (and the anonymous
type in the latter three cases).
by:
- 1.
- The subtype_indication, access_definition,
array_type_definition, single_task_declaration, or
single_protected_declaration is first elaborated.
This creates the nominal subtype (and the anonymous
type in the last four cases).
Replace paragraph 18: [AI95-00373-01]
- 3.
- The object is created, and, if there is not an initialization
expression, any per-object expressions (see 3.8) are elaborated and any
implicit initial values for the object or for its subcomponents are obtained
as determined by the nominal subtype.
by:
- 3.
- The object is created, and, if there is not an initialization
expression, any per-object expressions (see 3.8) are elaborated and any
implicit initial values for the object or for its subcomponents are obtained as
determined by the nominal subtype. Any initial values (whether explicit or
implicit) are assigned to the object or to the corresponding subcomponents. As
described in 5.2 and 7.6, Initialize and Adjust procedures can be called.
Delete paragraph 19: [AI95-00373-01]
- 4.
- Any initial values (whether explicit or implicit) are assigned
to the object or to the corresponding subcomponents. As described in 5.2 and
7.6, Initialize and Adjust procedures can be called.
Replace paragraph 20: [AI95-00373-01]
For the third step above, the object creation and any elaborations and
evaluations are performed in an arbitrary order, except that if the
default_expression for a discriminant is evaluated to obtain its initial
value, then this evaluation is performed before that of the
default_expression for any component that depends on the discriminant, and
also before that of any default_expression that includes the name of the
discriminant. The evaluations of the third step and the assignments of the
fourth step are performed in an arbitrary order, except that each evaluation is
performed before the resulting value is assigned.
by:
For the third step above, evaluations and assignments are
performed in an arbitrary order subject to the following restrictions:
-
Assignment to any part of the object is preceded
by the evaluation of the value that is to be assigned.
-
The evaluation of a default_expression that includes the name of
a discriminant is preceded by the assigment to that discriminant.
-
The evaluation of the default_expression for any component that
depends on a discriminant is preceded by the assignment to that
discriminant.
-
The assignments to any components, including implicit components,
not requiring late initialization must precede the initial value
evaluations for any components requiring late initialization; if two
components both require late initialization, then assignments to parts
of the component occurring earlier in the order of the component
declarations must precede the initial value evaluations of the
component occurring later.
3.4 Derived Types and Classes
Replace paragraph 1: [AI95-00401-01]
A derived_type_definition defines a new type (and its first subtype) whose
characteristics are derived from those of a parent type.
by:
A derived_type_definition defines a new type (and its first subtype) whose
characteristics are derived from those of a parent type, and possibly
from progenitor types.
Replace paragraph 2: [AI95-00251-01; AI95-00419-01]
derived_type_definition ::= [abstract] new parent_subtype_indication [record_extension_part]
by:
interface_list ::= interface_subtype_mark {and interface_subtype_mark}
derived_type_definition ::=
[abstract] [limited] new parent_subtype_indication [[and interface_list] record_extension_part]
Replace paragraph 3: [AI95-00251-01; AI95-00401-01]
The parent_subtype_indication defines the parent subtype; its type is
the parent type.
by:
An interface_subtype_mark in an interface_list names a
progenitor subtype; its type is the progenitor type. The
parent_subtype_indication defines the parent subtype; its type is
the parent type.
A derived type has one parent type and zero or more progenitor types.
Replace paragraph 5: [AI95-00401-01; AI95-00419-01]
If there is a record_extension_part, the derived type is called a
record extension of the parent type. A record_extension_part shall be
provided if and only if the parent type is a tagged type.
by:
If there is a record_extension_part, the derived type is called a
record extension of the parent type. A record_extension_part (and an
interface_list) shall be provided if and only if the parent type is a
tagged type.
If the reserved word limited appears in a derived_type_definition, the
parent type shall be a limited type.
Replace paragraph 8: [AI95-00251-01; AI95-00401-01]
-
Each class of types that includes the parent type also includes the
derived type.
by:
-
Each class of types that includes the parent type or a progenitor type
also includes the derived type.
Replace paragraph 15: [AI95-00419-01]
-
The derived type is limited if and only if the parent type is limited.
by:
-
The derived type is limited if the parent is a limited type that is not an interface type, or if the reserved word limited appears.
Replace paragraph 17: [AI95-00401-01]
-
For each user-defined primitive subprogram (other than a user-defined
equality operator -- see below) of the parent type that already exists at the
place of the derived_type_definition, there exists a corresponding
inherited primitive subprogram of the derived type with the same defining
name. Primitive user-defined equality operators of the parent type are also
inherited by the derived type, except when the derived type is a nonlimited
record extension, and the inherited operator would have a profile that is type
conformant with the profile of the corresponding predefined equality operator;
in this case, the user-defined equality operator is not inherited, but is
rather incorporated into the implementation of the predefined equality operator
of the record extension (see 4.5.2).
by:
-
For each user-defined primitive subprogram (other than a user-defined
equality operator -- see below) of the parent type or of a progenitor type that
already exists at the place of the derived_type_definition, there exists a
corresponding inherited primitive subprogram of the derived type with the
same defining name. Primitive user-defined equality operators of the parent
type are also inherited by the derived type, except when the derived type is a
nonlimited record extension, and the inherited operator would have a profile
that is type conformant with the profile of the corresponding predefined
equality operator; in this case, the user-defined equality operator is not
inherited, but is rather incorporated into the implementation of the predefined
equality operator of the record extension (see 4.5.2).
Replace paragraph 18: [AI95-00401-01]
The profile of an inherited subprogram (including an inherited enumeration
literal) is obtained from the profile of the corresponding (user-defined)
primitive subprogram of the parent type, after systematic replacement of each
subtype of its profile (see 6.1) that is of the parent type with a
corresponding subtype of the derived type. For a given subtype of the
parent type, the corresponding subtype of the derived type is defined as
follows:
by:
The profile of an inherited subprogram (including an inherited enumeration
literal) is obtained from the profile of the corresponding (user-defined)
primitive subprogram of the parent or progenitor type, after systematic
replacement of each subtype of its profile (see 6.1) that is of the parent or
progenitor type with a corresponding subtype of the derived type. For a
given subtype of the parent or progenitor type, the corresponding subtype of
the derived type is defined as follows:
Replace paragraph 22: [AI95-00401-01]
The same formal parameters have default_expressions in the profile of the
inherited subprogram. Any type mismatch due to the systematic replacement of
the parent type by the derived type is handled as part of the normal type
conversion associated with parameter passing -- see 6.4.1.
by:
The same formal parameters have default_expressions in the profile of the
inherited subprogram. Any type mismatch due to the systematic replacement of
the parent or progenitor type by the derived type is handled as part of the
normal type conversion associated with parameter passing -- see 6.4.1.
Replace paragraph 23: [AI95-00251-01; AI95-00401-01]
If a primitive subprogram of the parent type is visible at the place of the
derived_type_definition, then the corresponding inherited subprogram is
implicitly declared immediately after the derived_type_definition.
Otherwise, the inherited subprogram is implicitly declared later or not at all,
as explained in 7.3.1.
by:
If a primitive subprogram of the parent or progenitor type is visible at the
place of the derived_type_definition, then the corresponding inherited
subprogram is implicitly declared immediately after the
derived_type_definition. Otherwise, the inherited subprogram is implicitly
declared later or not at all, as explained in 7.3.1.
Replace paragraph 27: [AI95-00391-01; AI95-00401-01]
For the execution of a call on an inherited subprogram, a call on the
corresponding primitive subprogram of the parent type is performed; the normal
conversion of each actual parameter to the subtype of the corresponding formal
parameter (see 6.4.1) performs any necessary type conversion as well. If the
result type of the inherited subprogram is the derived type, the result of
calling the parent's subprogram is converted to the derived type.
by:
For the execution of a call on an inherited subprogram, a call on the
corresponding primitive subprogram of the parent or progenitor type is
performed; the normal conversion of each actual parameter to the subtype of the
corresponding formal parameter (see 6.4.1) performs any necessary type
conversion as well. If the result type of the inherited subprogram is the
derived type, the result of calling the parent or progenitor's subprogram is
converted to the derived type, or in the case of a null extension, extended to
the derived type using the equivalent of an extension_aggregate with the
original result as the ancestor_part and null record as the
record_component_association_list.
Insert after paragraph 35: [AI95-00251-01; AI95-00401-01]
17 If the reserved word abstract is given in the declaration
of a type, the type is abstract (see 3.9.3).
the new paragraph:
18 An interface type which has a progenitor type "is derived
from" that type, and therefore is a derived type. A
derived_type_definition, however, never defines an interface type.
3.4.1 Derivation Classes
Replace paragraph 2: [AI95-00251-01; AI95-00401-01]
A derived type is derived from its parent type directly; it is derived
indirectly from any type from which its parent type is derived. The
derivation class of types for a type T (also called the class rooted
at T) is the set consisting of T (the root type of the class) and
all types derived from T (directly or indirectly) plus any associated
universal or class-wide types (defined below).
by:
A derived type is derived from its parent type directly; it is derived
indirectly from any type from which its parent type is derived. A derived
type, interface type, type extension, task type, protected type, or formal
derived type is also derived from each of its progenitor types, if any. The
derivation class of types for a type T (also called the class rooted at
T) is the set consisting of T (the root type of the class) and all
types derived from T (directly or indirectly) plus any associated universal
or class-wide types (defined below).
Replace paragraph 6: [AI95-00230-01]
- Universal types
-
Universal types are defined for (and belong to) the integer, real, and fixed
point classes, and are referred to in this standard as respectively,
universal_integer, universal_real, and universal_fixed. These are
analogous to class-wide types for these language-defined numeric classes. As
with class-wide types, if a formal parameter is of a universal type, then an
actual parameter of any type in the corresponding class is acceptable. In
addition, a value of a universal type (including an integer or real
numeric_literal) is ``universal'' in that it is acceptable where some
particular type in the class is expected (see 8.6).
by:
- Universal types
-
Universal types are defined for (and belong to) the integer, real, fixed point,
and access classes, and are referred to in this standard as respectively,
universal_integer, universal_real, universal_fixed, and
universal_access. These are analogous to class-wide types for these
language-defined elementary classes. As with class-wide types, if a formal
parameter is of a universal type, then an actual parameter of any type in the
corresponding
class is acceptable. In addition, a value of a universal type (including an
integer or real numeric_literal, or the literal null) is ``universal''
in that it is acceptable where some particular type in the class is
expected (see 8.6).
Replace paragraph 10: [AI95-00230-01; AI95-00351-01]
A specific type T2 is defined to be a descendant of a type T1 if
T2 is the same as T1, or if T2 is derived (directly or indirectly)
from T1. A class-wide type T2'Class is defined to be a descendant of
type T1 if T2 is a descendant of T1. Similarly, the universal types
are defined to be descendants of the root types of their classes. If a type
T2 is a descendant of a type T1, then T1 is called an ancestor
of T2. The ultimate ancestor of a type is the ancestor of the type that
is not a descendant of any other type.
by:
A specific type T2 is defined to be a descendant of a type T1 if
T2 is the same as T1, or if T2 is derived (directly or indirectly)
from T1. A class-wide type T2'Class is defined to be a descendant of
type T1 if T2 is a descendant of T1. Similarly, the numeric
universal types are defined to be descendants of the root types of their
classes. If a type T2 is a descendant of a type T1, then T1 is
called an ancestor of T2. An ultimate ancestor of a type is an
ancestor of that type that is not itself a descendant of any other type. Each
untagged type has a unique ultimate ancestor.
3.5 Scalar Types
Insert after paragraph 27: [AI95-00285-01]
For an enumeration type, the function returns the value whose position
number is one less than that of the value of Arg; Constraint_Error is raised if
there is no such value of the type. For an integer type, the function returns
the result of subtracting one from the value of Arg. For a fixed point type,
the function returns the result of subtracting small from the value of Arg. For
a floating point type, the function returns the machine number (as defined in
3.5.7) immediately below the value of Arg; Constraint_Error is raised if there
is no such machine number.
the new paragraphs:
- S'Wide_Wide_Image
-
S'Wide_Wide_Image denotes a function with the following specification:
function S'Wide_Wide_Image(Arg : S'Base)
return Wide_Wide_String
The function returns an image of the value of Arg, that is, a
sequence of characters representing the value in display form. The lower bound
of the result is one.
The image of an integer value is the corresponding decimal literal,
without underlines, leading zeros, exponent, or trailing spaces, but with a
single leading character that is either a minus sign or a space.
The image of an enumeration value is either the corresponding
identifier in upper case or the corresponding character literal (including the
two apostrophes); neither leading nor trailing spaces are included. For a
nongraphic character (a value of a character type that has no enumeration
literal associated with it), the result is a corresponding language-defined
name in upper case (for example, the image of the nongraphic character
identified as nul is "NUL" -- the quotes are not part of the image).
The image of a floating point value is a decimal real literal best
approximating the value (rounded away from zero if halfway between) with a
single leading character that is either a minus sign or a space, a single digit
(that is nonzero unless the value is zero), a decimal point, S'Digits-1 (see
3.5.8) digits after the decimal point (but one if S'Digits is one), an upper
case E, the sign of the exponent (either + or -), and two or more digits (with
leading zeros if necessary) representing the exponent. If S'Signed_Zeros is
True, then the leading character is a minus sign for a negatively signed zero.
The image of a fixed point value is a decimal real literal best
approximating the value (rounded away from zero if halfway between) with a
single leading character that is either a minus sign or a space, one or more
digits before the decimal point (with no redundant leading zeros), a decimal
point, and S'Aft (see 3.5.10) digits after the decimal point.
Replace paragraph 30: [AI95-00285-01]
The function returns an image of the value of Arg, that is, a
sequence of characters representing the value in display form. The lower bound
of the result is one.
by:
The function returns an image of the value of Arg as a Wide_String,
that is, a sequence of characters representing the value in display form. The
lower bound of the result is one. The image has the same sequence of character
as defined for S'Wide_Wide_Image if all the graphic characters are defined in
Wide_Character; otherwise the sequence of characters is implementation defined
(but no shorter than that of S'Wide_Wide_Image for the same value of Arg).
Delete paragraph 31: [AI95-00285-01]
The image of an integer value is the corresponding decimal literal,
without underlines, leading zeros, exponent, or trailing spaces, but with a
single leading character that is either a minus sign or a space.
Delete paragraph 32: [AI95-00285-01]
The image of an enumeration value is either the corresponding
identifier in upper case or the corresponding character literal (including the
two apostrophes); neither leading nor trailing spaces are included. For a
nongraphic character (a value of a character type that has no enumeration
literal associated with it), the result is a corresponding language-defined or
implementation-defined name in upper case (for example, the image of the
nongraphic character identified as nul is "NUL" -- the quotes are not part
of the image).
Delete paragraph 33: [AI95-00285-01]
The image of a floating point value is a decimal real literal best
approximating the value (rounded away from zero if halfway between) with a
single leading character that is either a minus sign or a space, a single digit
(that is nonzero unless the value is zero), a decimal point, S'Digits-1 (see
3.5.8) digits after the decimal point (but one if S'Digits is one), an upper
case E, the sign of the exponent (either + or -), and two or more digits (with
leading zeros if necessary) representing the exponent. If S'Signed_Zeros is
True, then the leading character is a minus sign for a negatively signed zero.
Delete paragraph 34: [AI95-00285-01]
The image of a fixed point value is a decimal real literal best
approximating the value (rounded away from zero if halfway between) with a
single leading character that is either a minus sign or a space, one or more
digits before the decimal point (with no redundant leading zeros), a decimal
point, and S'Aft (see 3.5.10) digits after the decimal point.
Replace paragraph 37: [AI95-00285-01]
The function returns an image of the value of Arg as a String. The
lower bound of the result is one. The image has the same sequence of graphic
characters as that defined for S'Wide_Image if all the graphic characters are
defined in Character; otherwise the sequence of characters is implementation
defined (but no shorter than that of S'Wide_Image for the same value of Arg).
by:
The function returns an image of the value of Arg as a String. The
lower bound of the result is one. The image has the same sequence of character
as defined for S'Wide_Wide_Image if all the graphic characters are defined in
Character; otherwise the sequence of characters is implementation defined (but
no shorter than that of S'Wide_Wide_Image for the same value of Arg).
- S'Wide_Wide_Width
-
S'Wide_Wide_Width denotes the maximum length of a Wide_Wide_String returned by
S'Wide_Wide_Image over all the values of S. It denotes zero for a subtype that
has a null range. Its type is universal_integer.
Insert after paragraph 39: [AI95-00285-01]
- S'Width
-
S'Width denotes the maximum length of a String returned by S'Image over all
values of the subtype S. It denotes zero for a subtype that has a null range.
Its type is universal_integer.
the new paragraphs:
- S'Wide_Wide_Value
-
S'Wide_Wide_Value denotes a function with the following specification:
function S'Wide_Wide_Value(Arg : Wide_Wide_String)
return S'Base
This function returns a value given an image of the value as a
Wide_Wide_String, ignoring any leading or trailing spaces.
For the evaluation of a call on S'Wide_Wide_Value for an enumeration subtype S,
if the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an enumeration literal and if it corresponds to a
literal of the type of S (or corresponds to the result of S'Wide_Wide_Image
for a nongraphic character of the type), the result is the corresponding
enumeration value; otherwise Constraint_Error is raised.
For the evaluation of a call on S'Wide_Wide_Value for an integer subtype S, if
the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an integer literal, with an optional leading sign
character (plus or minus for a signed type; only plus for a modular type), and
the corresponding numeric value belongs to the base range of the type of S,
then that value is the result; otherwise Constraint_Error is raised.
For the evaluation of a call on S'Wide_Wide_Value for a real subtype
S, if the sequence of characters of the parameter (ignoring leading and
trailing spaces) has the syntax of one of the following:
-
base#based_numeral.#[exponent]
-
base#.based_numeral#[exponent]
with an optional leading sign character (plus or minus), and if the
corresponding numeric value belongs to the base range of the type of S, then
that value is the result; otherwise Constraint_Error is raised. The sign of a
zero value is preserved (positive if none has been specified) if S'Signed_Zeros
is True.
Replace paragraph 43: [AI95-00285-01]
For the evaluation of a call on S'Wide_Value for an enumeration subtype S,
if the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an enumeration literal and if it corresponds to a
literal of the type of S (or corresponds to the result of S'Wide_Image
for a nongraphic character of the type), the result is the corresponding
enumeration value; otherwise Constraint_Error is raised.
by:
For the evaluation of a call on S'Wide_Value for an enumeration subtype S,
if the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an enumeration literal and if it corresponds to a
literal of the type of S (or corresponds to the result of S'Wide_Image
for a nongraphic character of the type), the result is the corresponding
enumeration value; otherwise Constraint_Error is raised. For a numeric subtype
S, the evaluation of a call on S'Wide_Value with Arg of type Wide_String is
equivalent to a call on S'Wide_Wide_Value for a corresponding Arg of type
Wide_Wide_String.
Delete paragraph 44: [AI95-00285-01]
For the evaluation of a call on S'Wide_Value (or S'Value) for an integer
subtype S, if the sequence of characters of the parameter (ignoring leading and
trailing spaces) has the syntax of an integer literal, with an optional leading
sign character (plus or minus for a signed type; only plus for a modular type),
and the corresponding numeric value belongs to the base range of the type of S,
then that value is the result; otherwise Constraint_Error is raised.
Delete paragraph 45: [AI95-00285-01]
For the evaluation of a call on S'Wide_Value (or S'Value) for a real
subtype S, if the sequence of characters of the parameter (ignoring leading and
trailing spaces) has the syntax of one of the following:
Delete paragraph 46: [AI95-00285-01]
Delete paragraph 47: [AI95-00285-01]
Delete paragraph 48: [AI95-00285-01]
Delete paragraph 49: [AI95-00285-01]
-
base#based_numeral.#[exponent]
Delete paragraph 50: [AI95-00285-01]
-
base#.based_numeral#[exponent]
Delete paragraph 51: [AI95-00285-01]
with an optional leading sign character (plus or minus), and if the
corresponding numeric value belongs to the base range of the type of S, then
that value is the result; otherwise Constraint_Error is raised. The sign of a
zero value is preserved (positive if none has been specified) if S'Signed_Zeros
is True.
Replace paragraph 55: [AI95-00285-01]
For the evaluation of a call on S'Value for an enumeration subtype S,
if the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an enumeration literal and if it corresponds to a
literal of the type of S (or corresponds to the result of S'Image for a value
of the type), the result is the corresponding enumeration value; otherwise
Constraint_Error is raised. For a numeric subtype S, the evaluation of a call
on S'Value with Arg of type String is equivalent to a call on S'Wide_Value for
a corresponding Arg of type Wide_String.
by:
For the evaluation of a call on S'Value for an enumeration subtype S,
if the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an enumeration literal and if it corresponds to a
literal of the type of S (or corresponds to the result of S'Image for a value
of the type), the result is the corresponding enumeration value; otherwise
Constraint_Error is raised. For a numeric subtype S, the evaluation of a call
on S'Value with Arg of type String is equivalent to a call on S'Wide_Wide_Value
for a corresponding Arg of type Wide_Wide_String.
Replace paragraph 56: [AI95-00285-01]
An implementation may extend the Wide_Value, Value, Wide_Image, and Image
attributes of a floating point type to support special values such as
infinities and NaNs.
by:
An implementation may extend the Wide_Wide_Value, Wide_Value, Value,
Wide_Wide_Image, Wide_Image, and Image attributes of a floating point type to
support special values such as infinities and NaNs.
Replace paragraph 59: [AI95-00285-01]
21 For any value V (including any nongraphic character) of an
enumeration subtype S, S'Value(S'Image(V)) equals V, as does
S'Wide_Value(S'Wide_Image(V)). Neither expression ever raises
Constraint_Error.
by:
21 For any value V (including any nongraphic character) of an
enumeration subtype S, S'Value(S'Image(V)) equals V, as do
S'Wide_Value(S'Wide_Image(V)) and S'Wide_Wide_Value(S'Wide_Wide_Image(V)).
None of these expressions ever raise Constraint_Error.
3.5.2 Character Types
Replace paragraph 2: [AI95-00285-01]
The predefined type Character is a character type whose values correspond to
the 256 code positions of Row 00 (also known as Latin-1) of the ISO 10646 Basic
Multilingual Plane (BMP). Each of the graphic characters of Row 00 of the BMP
has a corresponding character_literal in Character. Each of the nongraphic
positions of Row 00 (0000-001F and 007F-009F) has a corresponding
language-defined name, which is not usable as an enumeration literal, but which
is usable with the attributes (Wide_)Image and (Wide_)Value; these names are
given in the definition of type Character in A.1, ``The Package Standard'', but
are set in italics.
by:
The predefined type Character is a character type whose values correspond to
the 256 code positions of Row 00 (also known as Latin-1) of the ISO/IEC 10646:2003 Basic
Multilingual Plane (BMP). Each of the graphic characters of Row 00 of the BMP
has a corresponding character_literal in Character. Each of the nongraphic
positions of Row 00 (0000-001F and 007F-009F) has a corresponding
language-defined name, which is not usable as an enumeration literal, but which
is usable with the attributes Image, Wide_Image,
Wide_Wide_Image, Value, Wide_Value, and Wide_Wide_Value; these names are
given in the definition of type Character in A.1, ``The Package Standard'', but
are set in italics.
Replace paragraph 3: [AI95-00285-01; AI95-00395-01]
The predefined type Wide_Character is a character type whose values correspond
to the 65536 code positions of the ISO 10646 Basic Multilingual Plane (BMP).
Each of the graphic characters of the BMP has a corresponding character_literal
in Wide_Character. The first 256 values of Wide_Character have the same
character_literal or language-defined name as defined for Character. The last 2
values of Wide_Character correspond to the nongraphic positions FFFE and FFFF
of the BMP, and are assigned the language-defined names FFFE and FFFF. As with
the other language-defined names for nongraphic characters, the names FFFE and
FFFF are usable only with the attributes (Wide_)Image and (Wide_)Value; they
are not usable as enumeration literals. All other values of Wide_Character are
considered graphic characters, and have a corresponding character_literal.
by:
The predefined type Wide_Character is a character type whose values correspond
to the 65536 code positions of the ISO/IEC 10646:2003 Basic Multilingual Plane (BMP).
Each of the graphic characters of the BMP has a corresponding character_literal
in Wide_Character. The first 256 values of Wide_Character have the same
character_literal or language-defined name as defined for Character.
Each of the graphic_characters has a corresponding character_literal.
The predefined type Wide_Wide_Character is a character type whose values
correspond to the 2147483648 code positions of the ISO/IEC 10646:2003 character
set. Each of the graphic_characters has a corresponding character_literal
in Wide_Wide_Character. The first 65536 values of Wide_Wide_Character have the
same character_literal or language-defined name as defined for
Wide_Character.
The characters whose code position is larger than 16#FF# and which are not
graphic_characters have language-defined names which are formed by
appending to the string "Hex_" the representation of their code position in
hexadecimal as eight extended digits. As with other language-defined names,
these names are usable only with the attributes (Wide_)Wide_Image and
(Wide_)Wide_Value; they are not usable as enumeration literals.
Delete paragraph 4: [AI95-00285-01]
In a nonstandard mode, an implementation may provide other interpretations for
the predefined types Character and Wide_Character, to conform to local
conventions.
Delete paragraph 5: [AI95-00285-01]
If an implementation supports a mode with alternative interpretations for
Character and Wide_Character, the set of graphic characters of Character should
nevertheless remain a proper subset of the set of graphic characters of
Wide_Character. Any character set ``localizations'' should be reflected in the
results of the subprograms defined in the language-defined package
Characters.Handling (see A.3) available in such a mode. In a mode with an
alternative interpretation of Character, the implementation should also support
a corresponding change in what is a legal identifier_letter.
3.5.4 Integer Types
Replace paragraph 16: [AI95-00340-01]
For every modular subtype S, the following attribute is defined:
by:
For every modular subtype S, the following attributes are defined:
S'Mod denotes a function with the following specification:
function S'Mod (Arg : universal_integer)
return S'Base
This function returns Arg mod S'Modulus.
3.5.9 Fixed Point Types
Replace paragraph 8: [AI95-00100-01]
The set of values of a fixed point type comprise the integral multiples of a
number called the small of the type. For a type defined by an
ordinary_fixed_point_definition (an ordinary fixed point type), the
small may be specified by an attribute_definition_clause (see 13.3); if so
specified, it shall be no greater than the delta of the type. If not
specified, the small of an ordinary fixed point type is an
implementation-defined power of two less than or equal to the delta.
by:
The set of values of a fixed point type comprise the integral multiples of a
number called the small of the type. The machine numbers of a fixed
point type are the values of the type that can be represented exactly in every
unconstrained variable of the type. For a type defined by an
ordinary_fixed_point_definition (an ordinary fixed point type), the
small may be specified by an attribute_definition_clause (see 13.3);
if so specified, it shall be no greater than the delta of the type. If not
specified, the small of an ordinary fixed point type is an
implementation-defined power of two less than or equal to the delta.
3.6 Array Types
Replace paragraph 7: [AI95-00230-01; AI95-00406-01]
component_definition ::= [aliased] subtype_indication
by:
component_definition ::=
[aliased] subtype_indication
| [aliased] access_definition
Delete paragraph 11: [AI95-00363-01]
Within the definition of a nonlimited composite type (or a limited composite
type that later in its immediate scope becomes nonlimited -- see 7.3.1 and
7.5), if a component_definition contains the reserved word aliased and
the type of the component is discriminated, then the nominal subtype of the
component shall be constrained.
Replace paragraph 22: [AI95-00230-01]
The elaboration of a discrete_subtype_definition that does not contain
any per-object expressions creates the discrete
subtype, and consists of the elaboration of the subtype_indication or the
evaluation of the range. The elaboration of a
discrete_subtype_definition that contains one or more per-object
expressions is defined in 3.8. The elaboration of a component_definition
in an array_type_definition consists of the elaboration of the
subtype_indication. The elaboration of any
discrete_subtype_definitions and the elaboration of
the component_definition are performed in an arbitrary order.
by:
The elaboration of a discrete_subtype_definition that does not contain
any per-object expressions creates the discrete
subtype, and consists of the elaboration of the subtype_indication or the
evaluation of the range. The elaboration of a
discrete_subtype_definition that contains one or more per-object
expressions is defined in 3.8. The elaboration of a component_definition
in an array_type_definition consists of the elaboration of the
subtype_indication or access_definition. The elaboration of any
discrete_subtype_definitions and the elaboration of
the component_definition are performed in an arbitrary order.
3.6.2 Operations of Array Types
Replace paragraph 16: [AI95-00287-01]
48 A component of an array can be named with an indexed_component.
A value of an array type can be specified with an array_aggregate, unless
the array type is limited. For a one-dimensional array type, a slice of the array
can be named; also, string literals are defined if the component type is a
character type.
by:
48 A component of an array can be named with an indexed_component.
A value of an array type can be specified with an array_aggregate. For a
one-dimensional array type, a slice of the array can be named; also, string
literals are defined if the component type is a character type.
3.6.3 String Types
Replace paragraph 2: [AI95-00285-01]
There are two predefined string types, String and Wide_String, each indexed by
values of the predefined subtype Positive; these are declared in the visible
part of package Standard:
by:
There are three predefined string types, String, Wide_String, and
Wide_Wide_String, each indexed by the value of the predefined subtype Positive;
these are declared in the visible part of package Standard:
Replace paragraph 4: [AI95-00285-01]
type String is array (Positive range <>) of Character;
type Wide_String is array (Positive range <>) of Wide_Character;
by:
type String is array (Positive range <>) of Character;
type Wide_String is array (Positive range <>) of Wide_Character;
type Wide_Wide_String is array (Positive range <>) of Wide_Wide_Character;
3.7 Discriminants
Replace paragraph 1: [AI95-00326-01]
A composite type (other than an array type) can have discriminants, which
parameterize the type. A known_discriminant_part specifies the
discriminants of a composite type. A discriminant of an object is a component
of the object, and is either of a discrete type or an access type. An
unknown_discriminant_part in the declaration of a partial view of a type
specifies that the discriminants of the type are unknown for the given view;
all subtypes of such a partial view are indefinite subtypes.
by:
A composite type (other than an array type) can have discriminants, which
parameterize the type. A known_discriminant_part specifies the
discriminants of a composite type. A discriminant of an object is a component
of the object, and is either of a discrete type or an access type. An
unknown_discriminant_part in the declaration of a view of a type
specifies that the discriminants of the type are unknown for the given view;
all subtypes of such a view are indefinite subtypes.
Replace paragraph 5: [AI95-00231-01]
discriminant_specification ::=
defining_identifier_list : subtype_mark [:= default_expression]
| defining_identifier_list : access_definition [:= default_expression]
by:
discriminant_specification ::=
defining_identifier_list : [null_exclusion] subtype_mark [:= default_expression]
| defining_identifier_list : access_definition [:= default_expression]
Replace paragraph 9: [AI95-00231-01; AI95-00254-01]
The subtype of a discriminant may be defined by a subtype_mark, in which
case the subtype_mark shall denote a discrete or access subtype, or it may
be defined by an access_definition (in which case the subtype_mark of
the access_definition may denote any kind of subtype). A discriminant that
is defined by an access_definition is called an access discriminant and is
of an anonymous general access-to-variable type whose designated subtype is
denoted by the subtype_mark of the access_definition.
by:
The subtype of a discriminant may be defined by an optional null_exclusion
and a subtype_mark, in which case the subtype_mark shall denote a
discrete or access subtype, or it may be defined by an access_definition.
A discriminant that is defined by an access_definition is called an
access discriminant and is of an anonymous access type.
Replace paragraph 10: [AI95-00230-01; AI95-00402-01]
A discriminant_specification for an access discriminant shall appear only
in the declaration for a task or protected type, or for a type with the
reserved word limited in its (full) definition or in that of one of its
ancestors. In addition to the places where Legality Rules normally apply (see
12.3), this rule applies also in the private part of an instance of a generic
unit.
by:
Default_expressions shall be provided either for all or for none of the
discriminants of a known_discriminant_part. No default_expressions are
permitted in a known_discriminant_part in a declaration of a tagged type
[or a generic formal type].
A discriminant_specification for an access discriminant
may have a default_expression only in the declaration for a task or
protected type, or for a type with the reserved word limited in its (full)
definition or in that of one of its ancestors. In addition to the places where
Legality Rules normally apply (see 12.3), this rule applies also in the private
part of an instance of a generic unit.
Delete paragraph 11: [AI95-00402-01]
Default_expressions shall be provided either for all or for none of the
discriminants of a known_discriminant_part. No default_expressions are
permitted in a known_discriminant_part in a declaration of a tagged type
[or a generic formal type].
Replace paragraph 27: [AI95-00230-01; AI95-00416-01]
An access_definition is elaborated when the value of a corresponding
access discriminant is defined, either by evaluation of its
default_expression or by elaboration of a discriminant_constraint.
The elaboration of an access_definition creates the anonymous access
type. When the expression defining the access discriminant is evaluated, it is
converted to this anonymous access type (see 4.6).
by:
For an access discriminant, its access_definition is elaborated when
the value of the access discriminant is defined: by
evaluation of its default_expression, by elaboration of a
discriminant_constraint, or by an assignment that initializes the
enclosing object.
3.7.1 Discriminant Constraints
Replace paragraph 7: [AI95-00363-01]
A discriminant_constraint is only allowed in a subtype_indication whose
subtype_mark denotes either an unconstrained discriminated subtype, or an
unconstrained access subtype whose designated subtype is an unconstrained
discriminated subtype. However, in the case of a general access subtype, a
discriminant_constraint is illegal if there is a place within the
immediate scope of the designated subtype where the designated subtype's view
is constrained.
by:
A discriminant_constraint is only allowed in a subtype_indication whose
subtype_mark denotes either an unconstrained discriminated subtype, or an
unconstrained access subtype whose designated subtype is an unconstrained
discriminated subtype. However, in the case of an access subtype, a
discriminant_constraint is illegal if the designated type has
a partial view that is constrained or, for a general access subtype, has
default_expressions for its discriminants. In addition to the places
where Legality Rules normally apply (see 12.3), these rules apply also in the
private part of an instance of a generic unit. In a generic body, this rule is
checked presuming all formal access types of the generic might be general
access types, and all untagged discriminated formal types of the generic might
have default_expressions for its discriminants.
3.8 Record Types
Delete paragraph 8: [AI95-00287-01]
A default_expression is not permitted if the component is of a limited
type.
Replace paragraph 9: [AI95-00366-01]
Each component_declaration declares a component of the record type.
Besides components declared by component_declarations, the components of a
record type include any components declared by discriminant_specifications
of the record type declaration. The identifiers of all components of a record
type shall be distinct.
by:
Each component_declaration declares a component of the record type.
Besides components declared by component_declarations, the components of a
record type include any components declared by discriminant_specifications
of the record type declaration. The identifiers of all components of a record
type shall be distinct.
Insert before paragraph 14: [AI95-00318-02]
The component_definition of a component_declaration defines the
(nominal) subtype of the component. If the reserved word aliased appears
in the component_definition, then the component is aliased (see 3.10).
the new paragraph:
If a record_type_declaration includes the reserved word limited, the
type is called a limited record type.
Replace paragraph 18: [AI95-00230-01]
Within the definition of a composite type, if a component_definition or
discrete_subtype_definition (see 9.5.2) includes a name that denotes
a discriminant of the type, or that is an attribute_reference whose
prefix denotes the current instance of the type, the expression containing the
name is called a per-object expression, and the constraint or
range being defined is called a per-object constraint. For the
elaboration of a component_definition of a component_declaration or
the discrete_subtype_definition of an entry_declaration for an entry
family (see 9.5.2), if the constraint or range of the
subtype_indication or discrete_subtype_definition is not a per-object
constraint, then the subtype_indication or discrete_subtype_definition
is elaborated. On the other hand, if the constraint or range is a
per-object constraint, then the elaboration consists of the evaluation of any
included expression that is not part of a per-object expression. Each such
expression is evaluated once unless it is part of a named association in a
discriminant constraint, in which case it is evaluated once for each associated
discriminant.
by:
Within the definition of a composite type, if a component_definition or
discrete_subtype_definition (see 9.5.2) includes a name that denotes
a discriminant of the type, or that is an attribute_reference whose
prefix denotes the current instance of the type, the expression containing the
name is called a per-object expression, and the constraint or
range being defined is called a per-object constraint. For the
elaboration of a component_definition of a component_declaration or
the discrete_subtype_definition of an entry_declaration for an entry
family (see 9.5.2), if the component subtype is defined by an
access_definition or if the constraint or range of the
subtype_indication or discrete_subtype_definition is not a per-object
constraint, then the access_definition, subtype_indication, or
discrete_subtype_definition is elaborated. On the other hand, if the
constraint or range is a per-object constraint, then the elaboration
consists of the evaluation of any included expression that is not part of a
per-object expression. Each such expression is evaluated once unless it is part
of a named association in a discriminant constraint, in which case it is
evaluated once for each associated discriminant.
Replace paragraph 25: [AI95-00287-01]
61 A component of a record can be named with a
selected_component. A value of a record can be specified with a
record_aggregate, unless the record type is limited.
by:
61 A component of a record can be named with a
selected_component. A value of a record can be specified with a
record_aggregate.
3.9 Tagged Types and Type Extensions
Replace paragraph 2: [AI95-00345-01]
A record type or private type that has the reserved word tagged in its
declaration is called a tagged type. When deriving from a tagged type,
additional components may be defined. As for any derived type, additional
primitive subprograms may be defined, and inherited primitive subprograms may
be overridden. The derived type is called an extension of the ancestor type, or
simply a type extension. Every type extension is also a tagged type, and is
either a record extension or a private extension of some other tagged type. A
record extension is defined by a derived_type_definition with a
record_extension_part. A private extension, which is a partial view of a
record extension, can be declared in the visible part of a package (see 7.3) or
in a generic formal part (see 12.5.1).
by:
A record type or private type that has the reserved word tagged in
its declaration is called a tagged type. In addition, an interface
type is a tagged type (see 3.9.4). When deriving from a tagged
type, as for any derived type, additional primitive subprograms may
be defined, and inherited primitive subprograms may be overridden.
The derived type is called an extension of its ancestor type(s), or
simply a type extension.
Every type extension is also a tagged type, and is either a record
extension of some other tagged type, a private extension, or a
task or protected type derived from an interface type (a synchronized tagged
type — see 3.9.4). A record extension is defined by a
derived_type_definition with a record_extension_part (see 3.9.1),
which may include the definition of additional components. A private
extension, which is a partial view of a record extension or of a
synchronized tagged type, can be declared in the visible part of a
package (see 7.3) or in a generic formal part (see 12.5.1).
Replace paragraph 4: [AI95-00344-01]
The tag of a specific tagged type identifies the full_type_declaration of
the type. If a declaration for a tagged type occurs within a
generic_package_declaration, then the corresponding type declarations in
distinct instances of the generic package are associated with distinct tags.
For a tagged type that is local to a generic package body, the language does
not specify whether repeated instantiations of the generic body result in
distinct tags.
by:
The tag of a specific tagged type identifies the full_type_declaration of
the type, and for a type extension, is sufficient to uniquely identify the type
among all descendants of the same ancestor. If a declaration for a tagged
type occurs within a generic_package_declaration, then the
corresponding type declarations in distinct instances of the generic
package are associated with distinct tags. For a tagged type that is local to a
generic package body and with all of its ancestors (if any) also local to the
generic body, the language does not specify whether repeated instantiations
of the generic body result in distinct tags.
Replace paragraph 6: [AI95-00260-02; AI95-00362-01]
package Ada.Tags is
type Tag is private;
by:
package Ada.Tags is
pragma Preelaborate(Tags);
type Tag is private;
No_Tag : constant Tag;
Insert after paragraph 7: [AI95-00260-02; AI95-00344-01; AI95-00405-01]
function Expanded_Name(T : Tag) return String;
function External_Tag(T : Tag) return String;
function Internal_Tag(External : String) return Tag;
the new paragraphs:
function Descendant_Tag(External : String; Ancestor : Tag) return Tag;
function Is_Descendant_At_Same_Level(Descendant, Ancestor : Tag)
return Boolean;
function Parent_Tag (T : Tag) return Tag;
type Tag_Array is array (Positive range <>) of Tag;
function Interface_Ancestor_Tags (T : Tag) return Tag_Array;
Insert after paragraph 9: [AI95-00260-02]
private
... -- not specified by the language
end Ada.Tags;
the new paragraph:
No_Tag is the default initial value of type Tag.
Replace paragraph 10: [AI95-00400-01]
The function Expanded_Name returns the full expanded name of the first subtype
of the specific type identified by the tag, in upper case, starting with a root
library unit. The result is implementation defined if the type is declared
within an unnamed block_statement.
by:
The function Wide_Wide_Expanded_Name returns the full expanded name of the
first subtype of the specific type identified by the tag, in upper case,
starting with a root library unit. The result is implementation defined if the
type is declared within an unnamed block_statement.
The function Expanded_Name (respectively, Wide_Expanded_Name) returns the same
sequence of graphic characters as that defined for Wide_Wide_Expanded_Name, if
all the graphic characters are defined in Character (respectively,
Wide_Character); otherwise, the sequence of characters is implementation
defined, but no shorter than that returned by Wide_Wide_Expanded_Name for the
same value of the argument.
Insert after paragraph 11: [AI95-00417-01]
The function External_Tag returns a string to be used in an external
representation for the given tag. The call External_Tag(S'Tag) is equivalent to
the attribute_reference S'External_Tag (see 13.3).
the new paragraph:
The string returned by the functions Expanded_Name, Wide_Expanded_Name,
Wide_Wide_Expanded_Name, and External_Tag has lower bound 1.
Replace paragraph 12: [AI95-00260-02; AI95-00279-01; AI95-00344-01; AI95-00405-01]
The function Internal_Tag returns the tag that corresponds to the given
external tag, or raises Tag_Error if the given string is not the external tag
for any specific type of the partition.
by:
The function Internal_Tag returns a tag that corresponds to the given
external tag, or raises Tag_Error if the given string is not the external tag
for any specific type of the partition. Tag_Error is also raised if the
specific type identified is a library-level type whose tag has not
yet been created (see 13.14).
The function Descendant_Tag returns the (internal) tag for the type
that corresponds to the given external tag and is both a descendant of the
type identified by the Ancestor tag and has the same accessibility level as
the identified ancestor. Tag_Error is raised if External is not the
external tag for such a type. Tag_Error is also raised if the
specific type identified is a library-level type whose tag has not
yet been created.
The function Is_Descendant_At_Same_Level returns True if Descendant tag
identifies a type that is both a descendant of the type identified
by Ancestor and at the same accessibility level. If not, it returns False.
The function Parent_Tag returns the tag of the parent type of the type whose
tag is T. If the type does not have a parent type (that is, it was not
declared by a derived_type_declaration), then No_Tag is returned.
The function Interface_Ancestor_Tags returns an array containing the tag of
each interface ancestor type of the type whose tag is T, other than T itself.
The lower bound of the returned array is 1, and the order of the returned tags
is unspecified. Each tag appears in the result exactly once. If the
type whose tag is T has no interface ancestors, a null array is returned.
Insert after paragraph 18: [AI95-00260-02]
- X'Tag
-
X'Tag denotes the tag of X. The value of this attribute is of type Tag.
the new paragraphs:
The following language-defined generic function exists:
generic
type T (<>) is abstract tagged limited private;
type Parameters (<>) is limited private;
with function Constructor (Params : access Parameters)
return T is abstract;
function Ada.Tags.Generic_Dispatching_Constructor
(The_Tag : Tag;
Params : access Parameters) return T'Class;
pragma Preelaborate (Generic_Dispatching_Constructor);
pragma Convention (Intrinsic, Generic_Dispatching_Constructor);
Tags.Generic_Dispatching_Constructor
provides a mechanism to create an object of an appropriate type from just a tag
value. The function Constructor is expected to create the object given a
reference to an object of type Parameters.
Insert after paragraph 25: [AI95-00260-02; AI95-00344-01; AI95-00405-01]
The tag is preserved by type conversion and by parameter passing. The tag of a
value is the tag of the associated object (see 6.2).
the new paragraphs:
Tag_Error is raised by a call of Descendant_Tag, Expanded_Name, External_Tag,
Interface_Ancestor_Tag, Is_Descendant_At_Same_Level, or Parent_Tag if any tag
passed is No_Tag.
An instance of Tags.Generic_Dispatching_Constructor or
Tags.Generic_Limited_Dispatching_Constructor raises Tag_Error if The_Tag
does not represent a concrete descendant of T.
Otherwise, it dispatches to the primitive function denoted by the formal
Constructor for the type identified by the tag The_Tag, passing Params, and
returns the result. Any exception raised by the function is propagated.
If the internal tag provided to an instance of Tags.Generic_Dispatching_Constructor
or Tags.Generic_Limited_Dispatching_Constructor identifies a specific type whose tag
has not been elaborated, or does not exist in the partition at the time of the
call, execution is erroneous.
Replace paragraph 26: [AI95-00279-01]
The implementation of the functions in Ada.Tags may raise Tag_Error if no
specific type corresponding to the tag passed as a parameter exists in the
partition at the time the function is called.
by:
The implementation of the functions in Ada.Tags may raise Tag_Error if no
specific type corresponding to the tag or external tag passed as a parameter
exists in the partition at the time the function is called.
Replace paragraph 30: [AI95-00260-02; AI95-00326-01]
65 If S denotes an untagged private type whose full type is
tagged, then S'Class is also allowed before the full type definition, but only
in the private part of the package in which the type is declared (see 7.3.1).
Similarly, the Class attribute is defined for incomplete types whose full type
is tagged, but only within the library unit in which the incomplete type is
declared (see 3.10.1).
by:
65 The capability provided by
Tags.Generic_Dispatching_Constructor is sometimes known as a
factory.
3.9.1 Type Extensions
Replace paragraph 3: [AI95-00344-01; AI95-00345-01]
The parent type of a record extension shall not be a class-wide type. If the
parent type is nonlimited, then each of the components of the
record_extension_part shall be nonlimited. The accessibility level (see
3.10.2) of a record extension shall not be statically deeper than that of its
parent type. In addition to the places where Legality Rules normally apply (see
12.3), these rules apply also in the private part of an instance of a generic
unit.
by:
The parent type of a record extension shall not be a class-wide type nor
shall it be a synchronized tagged type (see 3.9.4). If the
parent type is nonlimited, then each of the components of the
record_extension_part shall be nonlimited. In addition to the places
where Legality Rules normally apply (see 12.3), these rules apply also in the
private part of an instance of a generic unit.
Replace paragraph 4: [AI95-00344-01; AI95-00391-01]
A type extension shall not be declared in a generic body if the parent type is
declared outside that body.
by:
Within the body of a generic unit, or the body of any of its descendant
library units, a tagged type shall not be declared as a descendant
of a formal type declared within the formal part of the generic unit.
A record extension is a null extension if its declaration
has no known_discriminant_part and its record_extension_part
includes no component_declarations.
Replace paragraph 7: [AI95-00344-01]
The accessibility rules imply that a tagged type declared in a
library package_specification can be extended only at library level or as
a generic formal. When the extension is declared immediately within a
package_body, primitive subprograms are inherited and are overridable,
but new primitive subprograms cannot be added.
by:
When an extension is declared immediately within a
body, primitive subprograms are inherited and are overridable,
but new primitive subprograms cannot be added.
3.9.2 Dispatching Operations of Tagged Types
Replace paragraph 1: [AI95-00260-02]
The primitive subprograms of a tagged type are called dispatching
operations. A dispatching operation can be called using a statically
determined controlling tag, in which case the body to be executed is
determined at compile time. Alternatively, the controlling tag can be
dynamically determined, in which case the call dispatches to a body that is
determined at run time; such a call is termed a dispatching call. As
explained below, the properties of the operands and the context of a particular
call on a dispatching operation determine how the controlling tag is
determined, and hence whether or not the call is a dispatching call. Run-time
polymorphism is achieved when a dispatching operation is called by a
dispatching call.
by:
The primitive subprograms of a tagged type and the subprograms declared by
formal_abstract_subprogram_declarations, are called dispatching
operations. A dispatching operation can be called using a statically
determined controlling tag, in which case the body to be executed is
determined at compile time. Alternatively, the controlling tag can be
dynamically determined, in which case the call dispatches to a body that is
determined at run time; such a call is termed a dispatching call. As
explained below, the properties of the operands and the context of a particular
call on a dispatching operation determine how the controlling tag is
determined, and hence whether or not the call is a dispatching call. Run-time
polymorphism is achieved when a dispatching operation is called by a
dispatching call.
Replace paragraph 2: [AI95-00260-02; AI95-00416-01]
A call on a dispatching operation is a call whose name or prefix
denotes the declaration of a primitive subprogram of a tagged type, that is, a
dispatching operation. A controlling operand in a call on a dispatching
operation of a tagged type T is one whose corresponding formal parameter is
of type T or is of an anonymous access type with designated type T; the
corresponding formal parameter is called a controlling formal parameter. If
the controlling formal parameter is an access parameter, the controlling
operand is the object designated by the actual parameter, rather than the
actual parameter itself. If the call is to a (primitive) function with result
type T, then the call has a controlling result -- the context of the
call can control the dispatching.
by:
A call on a dispatching operation is a call whose name or prefix
denotes the declaration of a dispatching operation. A controlling operand
in a call on a dispatching operation of a tagged type T is one whose
corresponding formal parameter is of type T or is of an anonymous access
type with designated type T; the corresponding formal parameter is called a
controlling formal parameter. If the controlling formal parameter is an
access parameter, the controlling operand is the object designated by the
actual parameter, rather than the actual parameter itself. If the call is to a
(primitive) function with result type T, then the call has a controlling
result -- the context of the call can control the dispatching. Similarly, if
the call is to a function with access result type designating T, then the
call has a controlling access result, and the context can similarly control
dispatching.
Replace paragraph 4: [AI95-00416-01]
-
The name or expression is statically tagged if it is of a
specific tagged type and, if it is a call with a controlling result, it has at
least one statically tagged controlling operand;
by:
-
The name or expression is statically tagged if it is of a
specific tagged type and, if it is a call with a controlling result or
controlling access result, it has at least one statically tagged controlling
operand;
Replace paragraph 5: [AI95-00416-01]
-
The name or expression is dynamically tagged if it is of a
class-wide type, or it is a call with a controlling result and at least one
dynamically tagged controlling operand;
by:
-
The name or expression is dynamically tagged if it is of a
class-wide type, or it is a call with a controlling result or controlling
access result and at least one dynamically tagged controlling operand;
Replace paragraph 6: [AI95-00416-01]
-
The name or expression is tag indeterminate if it is a call
with a controlling result, all of whose controlling operands (if any) are tag
indeterminate.
by:
-
The name or expression is tag indeterminate if it is a call
with a controlling result or controlling access result, all of whose
controlling operands (if any) are tag indeterminate.
Replace paragraph 11: [AI95-00404-01; AI95-00416-01]
The default_expression for a controlling formal parameter of a dispatching
operation shall be tag indeterminate. A controlling formal parameter that is an
access parameter shall not have a default_expression.
by:
The default_expression for a controlling formal parameter of a dispatching
operation shall be tag indeterminate.
Replace paragraph 17: [AI95-00196-01]
If all of the controlling operands are tag-indeterminate, then:
by:
If all of the controlling operands (if any) are tag-indeterminate, then:
Replace paragraph 18: [AI95-00196-01; AI95-00239-01]
-
If the call has a controlling result and is itself a (possibly
parenthesized or qualified) controlling operand of an enclosing call on a
dispatching operation of type T, then its controlling tag value is
determined by the controlling tag value of this enclosing call;
by:
-
If the call has a controlling result and is itself a (possibly
parenthesized or qualified) controlling operand of an enclosing call on a
dispatching operation of a descendant of type T, then its controlling tag
value is determined by the controlling tag value of this enclosing call;
-
If the call has a controlling result and is the (possibly
parenthesized or qualified) expression of an assignment_statement whose
target is of a class-wide type, then its controlling tag value is determined
by the target;
Replace paragraph 22: [AI95-00260-02]
73 This subclause covers calls on primitive subprograms of
a tagged type. Rules for tagged type membership tests are described
in 4.5.2. Controlling tag determination for an assignment_statement
is described in 5.2).
by:
73 This subclause covers calls on dispatching subprograms of
a tagged type. Rules for tagged type membership tests are described
in 4.5.2. Controlling tag determination for an assignment_statement
is described in 5.2).
3.9.3 Abstract Types and Subprograms
Replace paragraph 1: [AI95-00345-01]
An abstract type is a tagged type intended for use as a parent type for
type extensions, but which is not allowed to have objects of its own. An
abstract subprogram is a subprogram that has no body, but is intended to be
overridden at some point when inherited. Because objects of an abstract type
cannot be created, a dispatching call to an abstract subprogram always
dispatches to some overriding body.
by:
An abstract type is a tagged type intended for use as an ancestor of other
types, but which is not allowed to have objects of its own. An abstract
subprogram is a subprogram that has no body, but is intended to be overridden
at some point when inherited. Because objects of an abstract type cannot be
created, a dispatching call to an abstract subprogram always dispatches to some
overriding body.
Interface types (see 3.9.4) are abstract types. In addition, a
tagged type that has the reserved word abstract in its declaration
is an abstract type. The class-wide type (see 3.4.1) rooted at an
abstract type is not itself an abstract type.
Replace paragraph 2: [AI95-00345-01]
An abstract type is a specific type that has the reserved word abstract in
its declaration. Only a tagged type is allowed to be declared abstract.
by:
Only a tagged type shall have the reserved word abstract in its
declaration.
Replace paragraph 3: [AI95-00260-02]
A subprogram declared by an abstract_subprogram_declaration (see 6.1)
is an abstract subprogram. If it is a primitive subprogram of a tagged
type, then the tagged type shall be abstract.
by:
A subprogram declared by an abstract_subprogram_declaration (see 6.1) or
declared declared by a formal_abstract_subprogram_declaration (see 12.6)
is an abstract subprogram. If it is a primitive subprogram of a tagged type,
then the tagged type shall be abstract.
Replace paragraph 4: [AI95-00251-01; AI95-00334-01]
For a derived type, if the parent or ancestor type has an abstract primitive
subprogram, or a primitive function with a controlling result, then:
by:
If a type has an implicitly declared primitive subprogram that is
inherited or is the predefined equality operator, and the corresponding
primitive subprogram of the parent or ancestor type is abstract or is a
function with a controlling access result, or if a type
other than a null extension inherits a
function with a controlling result, then:
Replace paragraph 5: [AI95-00251-01; AI95-00334-01]
-
If the derived type is abstract or untagged, the inherited subprogram
is abstract.
by:
-
If the type is abstract or untagged, the implicitly declared
subprogram is abstract.
Replace paragraph 6: [AI95-00391-01]
Otherwise, the subprogram shall be overridden with a nonabstract subprogram;
for a type declared in the visible part of a package, the overriding may be
either in the visible or the private part. However, if the type is a generic
formal type, the subprogram need not be overridden for the formal type itself;
a nonabstract version will necessarily be provided by the actual type.
by:
Otherwise, the subprogram shall be overridden with a nonabstract subprogram or,
in the case of a private extension inheriting a function with a controlling
result, have a full type that is a null extension; for a type declared in the
visible part of a package, the overriding may be either in the visible or the
private part. However, if the type is a generic formal type, the subprogram
need not be overridden for the formal type itself; a nonabstract version will
necessarily be provided by the actual type.
Replace paragraph 11: [AI95-00260-02]
A generic actual subprogram shall not be an abstract subprogram.
The prefix of an attribute_reference for the Access,
Unchecked_Access, or Address attributes shall not denote an abstract
subprogram.
by:
A generic actual subprogram shall not be an abstract subprogram unless the
generic formal subprogram is declared by a
formal_abstract_subprogram_declaration.
The prefix of an attribute_reference for the Access,
Unchecked_Access, or Address attributes shall not denote an abstract
subprogram.
3.9.4 Interface Types
Insert new clause: [AI95-00251-01; AI95-00345-01; AI95-00396-01]
An interface type is an abstract tagged type that provides a restricted
form of multiple inheritance. A tagged, task, or protected type have
one or more interface types as ancestors.
interface_type_definition ::=
[limited | task | protected | synchronized] interface [and interface_list]
An interface type (also called an "interface") is a specific abstract
tagged type that is defined by an interface_type_definition.
An interface with the reserved word limited, task, protected, or
synchronized in its definition is termed, respectively, a limited
interface, a task interface, a protected interface, or a
synchronized interface. In addition, all task and protected interfaces
are synchronized interfaces, and all synchronized interfaces are limited
interfaces. A view of an object that is of a task interface type (or of a
corresponding class-wide type) is a task object. Similarly, a view of an
object that is of a protected interface type (or of a corresponding
class-wide type) is a protected object.
A task or protected type derived from an interface is a tagged type. Such
a tagged type is called a synchronized tagged type, as are synchronized
interfaces and private extensions derived from synchronized interfaces.
An interface type has no components.
All user-defined primitive subprograms of an interface type shall be
abstract subprograms or null procedures.
The type of a subtype named in an interface_list shall be an
interface type.
Within the body of a generic unit, or the body of any of its descendant
library units, a tagged type shall not be declared as a descendant of a
formal type declared within the formal part of the generic unit.
A descendant of a nonlimited interface shall be nonlimited. A descendant
of a task interface shall be a task type or a task interface. A descendant
of a protected interface shall be a protected type or a protected
interface. A descendant of a synchronized interface shall be a task type,
a protected type, or a synchronized interface.
A full view shall be a descendant of an interface type if and only if
the corresponding partial view (if any) is also a descendant of the interface
type, or if the partial view is untagged.
For an interface type declared in a visible part, a primitive
subprogram shall not be declared in the private part.
In addition to the places where Legality Rules normally apply
(see 12.3), these rules apply also in the private part of an instance
of a generic unit.
The elaboration of an interface_type_definition has no effect.
NOTES
79 Nonlimited interface types have predefined nonabstract equality
operators. These may be overridden with user-defined abstract
equality operators. Such operators will then require
an explicit overriding for any nonabstract descendant of the interface.
3.10 Access Types
Replace paragraph 2: [AI95-00231-01]
access_type_definition ::=
access_to_object_definition
| access_to_subprogram_definition
by:
access_type_definition ::=
[null_exclusion] access_to_object_definition
| [null_exclusion] access_to_subprogram_definition
Replace paragraph 6: [AI95-00231-01; AI95-00254-01; AI95-00404-01]
access_definition ::= access subtype_mark
by:
null_exclusion ::= not null
access_definition ::=
[null_exclusion] access [constant] subtype_mark
| [null_exclusion] access [protected] procedure parameter_profile
| [null_exclusion] access [protected] function parameter_and_result_profile
Replace paragraph 9: [AI95-00225-01; AI95-00363-01]
A view of an object is defined to be aliased if it is defined by an
object_declaration or component_definition with the reserved word
aliased, or by a renaming of an aliased view. In addition, the dereference
of an access-to-object value denotes an aliased view, as does a view conversion
(see 4.6) of an aliased view. Finally, the current instance of a limited
type, and a formal parameter or generic formal object of a tagged type are
defined to be aliased. Aliased views are the ones that can be designated by
an access value. If the view defined by an object_declaration is aliased,
and the type of the object has discriminants, then the object is constrained;
if its nominal subtype is unconstrained, then the object is constrained by
its initial value. Similarly, if the object created by an allocator has
discriminants, the object is constrained, either by the designated subtype,
or by its initial value.
by:
A view of an object is defined to be aliased if it is defined by an
object_declaration or component_definition with the reserved word
aliased, or by a renaming of an aliased view. In addition, the dereference
of an access-to-object value denotes an aliased view, as does a view conversion
(see 4.6) of an aliased view. A current instance of a limited tagged type, a
protected type, a task type, or a type that has the reserved word limited
in its full definition is also defined to be aliased. Finally, a formal
parameter or generic formal object of a tagged type is defined to be aliased.
Aliased views are the ones that can be designated by an access value.
Replace paragraph 12: [AI95-00230-01; AI95-00231-01; AI95-00254-01]
An access_definition defines an anonymous general access-to-variable type;
the subtype_mark denotes its designated subtype. An
access_definition is used in the specification of an access discriminant
(see 3.7) or an access parameter (see 6.1).
by:
An access_definition defines an anonymous general access type or an
anonymous access-to-subprogram type. For a general access type, the
subtype_mark denotes its designated subtype; if the
general_access_modifier constant appears, the type is an
access-to-constant type; otherwise it is
an access-to-variable type. For an access-to-subprogram type, the
parameter_profile or parameter_and_result_profile denotes its
designated profile. If a null_exclusion is present, or the
access_definition is for a controlling access parameter (see 3.9.2), the
access_definition defines an access subtype which excludes the null value;
otherwise the subtype includes a null value.
Replace paragraph 13: [AI95-00230-01; AI95-00231-01]
For each (named) access type, there is a literal null which has a null access
value designating no entity at all. The null value of a named access type is
the default initial value of the type. Other values of an access type are
obtained by evaluating an attribute_reference for the Access or
Unchecked_Access attribute of an aliased view of an object or non-intrinsic
subprogram, or, in the case of a named access-to-object type, an allocator,
which returns an access value designating a newly created object (see 3.10.2).
by:
For each access type, there is a null access value designating no entity at
all, which can be obtained by converting the literal null to the access
type. The null value of an access type is the default initial value of the
type. Non-null values of an access-to-object type are obtained by evaluating an
allocator, which returns an access value designating a newly created
object (see 3.10.2), or in the case of a general access-to-object type,
evaluating an attribute_reference for the Access or Unchecked_Access
attribute of an aliased view of an object. Non-null values of an
access-to-subprogram type are obtained by evaluating an
attribute_reference for the Access attribute of a non-intrinsic
subprogram.
Replace paragraph 14: [AI95-00231-01]
All subtypes of an access-to-subprogram type are constrained. The first subtype
of a type defined by an access_definition or an
access_to_object_definition is unconstrained if the designated subtype is
an unconstrained array or discriminated subtype; otherwise it is constrained.
by:
All subtypes of an access-to-subprogram type are constrained. The first subtype
of a type defined by an access_definition or an
access_to_object_definition is unconstrained if the designated subtype is
an unconstrained array or discriminated subtype; otherwise it is constrained.
The first subtype of a type defined by an access_type_definition excludes
the null value if a null_exclusion is present; otherwise, the first
subtype includes the null value.
A null_exclusion is only allowed in a subtype_indication whose
subtype_mark denotes an access subtype that includes a null value.
Replace paragraph 15: [AI95-00231-01]
A composite_constraint is compatible with an unconstrained access
subtype if it is compatible with the designated subtype. An access value
satisfies a composite_constraint of an access subtype if it equals the
null value of its type or if it designates an object whose value satisfies the
constraint.
by:
A composite_constraint is compatible with an unconstrained access
subtype if it is compatible with the designated subtype. A null_exclusion
is compatible with any access subtype that includes a null value. An
access value satisfies a composite_constraint of an access subtype if
it equals the null value of its type or if it designates an object whose value
satisfies the constraint. An access value satisifes a null_exclusion
imposed on an access subtype if it does not equal the null value of its type.
Replace paragraph 17: [AI95-00230-01; AI95-00254-01]
The elaboration of an access_definition creates an anonymous general
access-to-variable type [(this happens as part of the initialization of an
access parameter or access discriminant)].
by:
The elaboration of an access_definition creates an anonymous access type.
3.10.1 Incomplete Type Declarations
Replace paragraph 2: [AI95-00326-01; AI95-00412-01]
incomplete_type_declaration ::= type defining_identifier [discriminant_part];
by:
incomplete_type_declaration ::= type defining_identifier [discriminant_part] [is tagged];
An incomplete_type_declaration declares an incomplete view of a type,
and its first subtype; the first subtype is unconstrained if a
discriminant_part appears. If the incomplete_type_declaration
includes the reserved word tagged, it declares a tagged incomplete view.
An incomplete view of a type is a limited view of the type (see 7.5).
Given an access type A whose designated type T is an incomplete view,
a dereference of a value of type A also has this incomplete view
except when:
-
it occurs within the immediate scope of the completion of T, or
-
it occurs within the scope of a nonlimited_with_clause that mentions
a library package in whose visible part the completion of T is declared.
In these cases, the dereference has the full view of T.
Similarly, if a subtype_mark denotes a subtype_declaration defining
a subtype of an incomplete view T, the subtype_mark denotes an
incomplete view except under the same two circumstances given above,
in which case it denotes the full view of T.
Replace paragraph 4: [AI95-00326-01]
If an incomplete_type_declaration has a known_discriminant_part, then
a full_type_declaration that completes it shall have a fully conforming
(explicit) known_discriminant_part (see 6.3.1). If an
incomplete_type_declaration has no discriminant_part (or an
unknown_discriminant_part), then a corresponding full_type_declaration
is nevertheless allowed to have discriminants, either explicitly, or inherited
via derivation.
by:
If an incomplete_type_declaration includes the reserved word tagged, then a
full_type_declaration that completes it shall declare a tagged type.
If an incomplete_type_declaration has a known_discriminant_part, then
a full_type_declaration that completes it shall have a fully conforming
(explicit) known_discriminant_part (see 6.3.1). If an
incomplete_type_declaration has no discriminant_part (or an
unknown_discriminant_part), then a corresponding full_type_declaration
is nevertheless allowed to have discriminants, either explicitly, or inherited
via derivation.
Replace paragraph 5: [AI95-00326-01]
The only allowed uses of a name that denotes an
incomplete_type_declaration are as follows:
by:
A name that denotes an incomplete view of a type may be used as follows:
Replace paragraph 7: [AI95-00326-01; AI95-00412-01]
-
as the subtype_mark defining the subtype of a parameter or
result of an access_to_subprogram_definition;
by:
-
as the subtype_mark in the subtype_indication of a
subtype_declaration; the subtype_indication shall not have a
null_exclusion or a constraint;
Replace paragraph 8: [AI95-00326-01]
-
as the subtype_mark in an access_definition;
by:
-
as the subtype_mark in an access_definition.
If such a name denotes a tagged incomplete view, it may also be used:
-
as the subtype_mark defining the subtype of a parameter in a
formal_part;
Replace paragraph 9: [AI95-00326-01]
-
as the prefix of an attribute_reference whose
attribute_designator is Class; such an attribute_reference is
similarly restricted to the uses allowed here; when used in this way, the
corresponding full_type_declaration shall declare a tagged type, and the
attribute_reference shall occur in the same library unit as the
incomplete_type_declaration.
by:
-
as the prefix of an attribute_reference whose
attribute_designator is Class; such an attribute_reference is
restricted to the uses allowed here; it denotes a tagged incomplete view.
If such a name occurs within the list of declarative_items containing
the completion of the incomplete view, it may also be used:
-
as the subtype_mark defining the subtype of a parameter or result
of an access_to_subprogram_definition.
If any of the above uses occurs as part of the declaration of a primitive
subprogram of the incomplete view, and the declaration occurs immediately
within the private part of a package, then the completion of the incomplete
view shall also occur immediately within the private part; it may not be
deferred to the package body.
No other uses of a name that denotes an incomplete view of a type are
allowed.
Replace paragraph 10: [AI95-00217-06; AI95-00326-01]
A dereference (whether implicit or explicit -- see 4.1) shall not be
of an incomplete type.
by:
A prefix shall not be of an incomplete view.
Delete paragraph 11: [AI95-00326-01]
An incomplete_type_declaration declares an incomplete type and its first
subtype; the first subtype is unconstrained if a known_discriminant_part
appears.
3.10.2 Operations of Access Types
Replace paragraph 2: [AI95-00235-01]
For an attribute_reference with attribute_designator Access (or
Unchecked_Access -- see 13.10), the expected type shall be
a single access type; the prefix of such an attribute_reference
is never interpreted as an implicit_dereference. If the expected
type is an access-to-subprogram type, then the expected profile
of the prefix is the designated profile of the access type.
by:
For an attribute_reference with attribute_designator Access (or
Unchecked_Access -- see 13.10), the expected type shall be
a single access type A such that:
-
A is an access-to-object type with designated type D and the
type of the prefix is D'Class or is covered by D, or
-
A is an access-to-subprogram type whose designated profile is type
conformant with that of the prefix.
The prefix of such an attribute_reference is never interpreted as an
implicit_dereference or a parameterless function_call (see 4.1.4).
The designated type or profile of the expected type of the
attribute_reference is the expected type or profile for the prefix.
Replace paragraph 3: [AI95-00162-01]
The accessibility rules, which prevent dangling references, are written in
terms of accessibility levels, which reflect the run-time nesting of
masters. As explained in 7.6.1, a master is the execution of a task_body,
a block_statement, a subprogram_body, an entry_body, or an
accept_statement. An accessibility level is deeper than another if it
is more deeply nested at run time. For example, an object declared local to a
called subprogram has a deeper accessibility level than an object declared
local to the calling subprogram. The accessibility rules for access types
require that the accessibility level of an object designated by an access value
be no deeper than that of the access type. This ensures that the object will
live at least as long as the access type, which in turn ensures that the access
value cannot later designate an object that no longer exists. The
Unchecked_Access attribute may be used to circumvent the accessibility rules.
by:
The accessibility rules, which prevent dangling references, are written in
terms of accessibility levels, which reflect the run-time nesting of
masters (see 7.6.1). An accessibility level is deeper than another if it
is more deeply nested at run time. For example, an object declared local to a
called subprogram has a deeper accessibility level than an object declared
local to the calling subprogram. The accessibility rules for access types
require that the accessibility level of an object designated by an access value
be no deeper than that of the access type. This ensures that the object will
live at least as long as the access type, which in turn ensures that the access
value cannot later designate an object that no longer exists. The
Unchecked_Access attribute may be used to circumvent the accessibility rules.
Replace paragraph 7: [AI95-00162-01]
-
An entity or view created by a declaration has the same accessibility
level as the innermost enclosing master, except in the cases of renaming and
derived access types described below. A parameter of a master has the same
accessibility level as the master.
by:
-
An entity or view created by a declaration has the same accessibility
level as the innermost enclosing master other than the declaration itself,
except in the cases of renaming and derived access types described below. A
parameter of a master has the same accessibility level as the master.
Replace paragraph 9: [AI95-00416-01]
-
The accessibility level of a view conversion is the same as that of
the operand.
by:
-
The accessibility level of a view conversion, qualified expression,
or parenthesized_expression, is the same as that of the operand.
Replace paragraph 10: [AI95-00318-02; AI95-00416-01]
-
For a function whose result type is a return-by-reference type, the
accessibility level of the result object is the same as that of the master that
elaborated the function body. For any other function, the accessibility level
of the result object is that of the execution of the called function.
by:
-
The accessibility level of the result of a function call that is
used as a prefix of a name or as the actual parameter in a call
is that of the immediately enclosing master. In other contexts, the
accessibility level is that of the object being initialized from
the function result.
-
Within a return statement, the accessibility level of the return
object is that of the execution of the return statement. If the
return statement completes normally by returning from the
function, prior to leaving the function, the accessibility level
of the return object changes to be a level determined by the point
of call.
Replace paragraph 12: [AI95-00230-01; AI95-00416-01]
-
The accessibility level of the anonymous access type of an access
discriminant is the same as that of the containing object or associated
constrained subtype.
by:
-
For an access discriminant, the accessibility level of its
anonymous access type is determined as follows:
-
For an access discriminant whose value is determined by a
discriminant_association in a subtype_indication, the
accessibility level of the object or subprogram designated by
the associated value (or library level if the value is null);
-
For an access discriminant of an object defined by an aggregate
where the value of the discriminant is determined by a
component_association in the aggregate, the accessibility
level of the object or subprogram designated by the associated
value (or library level if the value is null);
-
For an access discriminant of any other object with an unconstrained
nominal subtype, the accessibility level of the object.
Replace paragraph 13: [AI95-00162-01; AI95-00254-01; AI95-00318-02; AI95-00416-01]
-
The accessibility level of the anonymous access type of an access
parameter is the same as that of the view designated by the actual. If the
actual is an allocator, this is the accessibility level of the execution
of the called subprogram.
by:
-
The accessibility level of the anonymous access type of an access
parameter specifying an access-to-object type is the same as that of the view
designated by the actual.
-
The accessibility level of the anonymous access type of an access
parameter specifying an access-to-subprogram type is infinite.
Replace paragraph 14: [AI95-00416-01]
-
The accessibility level of an object created by an allocator is
the same as that of the access type.
by:
-
The accessibility level of an object created by an allocator is
the same as that of the access type, except for an allocator that
defines the value of an access parameter or an access discriminant.
For an access parameter, the accessibility level is that of the
master immediately enclosing the call. For an access discriminant,
the accessibility level is determined as follows:
-
for an allocator used to define the constraint in a
subtype_declaration, the level of the subtype_declaration;
-
for an allocator used to define the constraint in a
component_definition, the level of the enclosing type;
-
for an allocator used to define the discriminant of an object,
the level of the object.
Replace paragraph 19: [AI95-00254-01]
The statically deeper relationship does not apply to the accessibility
level of the anonymous type of an access parameter;
that is, such an accessibility level is not considered to be statically
deeper, nor statically shallower, than any other.
by:
The statically deeper relationship does not apply to the accessibility
level of the anonymous type of an access parameter specifying an
access-to-object type;
that is, such an accessibility level is not considered to be statically
deeper, nor statically shallower, than any other.
Replace paragraph 26: [AI95-00363-01]
-
The view shall not be a subcomponent that depends on discriminants of
a variable whose nominal subtype is unconstrained, unless this subtype is
indefinite, or the variable is aliased.
by:
-
The view shall not be a subcomponent that depends on discriminants of
a variable whose nominal subtype is unconstrained, unless this subtype is
indefinite, or the variable is constrained by its initial value.
Replace paragraph 27: [AI95-00363-01]
-
If A is a named access type and D is a tagged type, then the
type of the view shall be covered by D; if A is anonymous and D is
tagged, then the type of the view shall be either D'Class or a type
covered by D; if D is untagged, then the type of the view shall be
D, and A's designated subtype shall either statically match the
nominal subtype of the view or be discriminated and unconstrained;
by:
-
If A is a named access type and D is a tagged type, then the
type of the view shall be covered by D; if A is anonymous and D is
tagged, then the type of the view shall be either D'Class or a type
covered by D; if D is untagged, then the type of the view shall be
D, and either:
-
the designated subtype of A shall statically match the nominal
subtype of the view; or
-
D shall be discriminated in its full view and unconstrained in any
partial view, and the designated subtype of A shall be unconstrained.
Replace paragraph 32: [AI95-00229-01; AI95-00254-01]
P'Access yields an access value that designates the subprogram
denoted by P. The type of P'Access is an access-to-subprogram
type (S), as determined by the expected type. The accessibility
level of P shall not be statically deeper than that of S. In
addition to the places where Legality Rules normally apply (see
12.3), this rule applies also in the private part of an instance
of a generic unit. The profile of P shall be subtype-conformant
with the designated profile of S, and shall not be Intrinsic. If
the subprogram denoted by P is declared within a generic body, S
shall be declared within the generic body.
by:
P'Access yields an access value that designates the subprogram
denoted by P. The type of P'Access is an access-to-subprogram
type (S), as determined by the expected type. The accessibility
level of P shall not be statically deeper than that of S. In
addition to the places where Legality Rules normally apply (see
12.3), this rule applies also in the private part of an instance
of a generic unit. The profile of P shall be subtype-conformant
with the designated profile of S, and shall not be Intrinsic.
If the subprogram denoted by P is declared within a generic unit,
and the expression P'Access occurs within the body of that generic
unit or within the body of a generic unit declared within
the declarative region of the generic, then the ultimate ancestor
of S shall be either a non-formal type declared within the generic
unit or an anonymous access type of an access parameter.
Replace paragraph 34: [AI95-00230-01]
82 The predefined operations of an access type also include the
assignment operation, qualification, and membership tests. Explicit conversion
is allowed between general access types with matching designated subtypes;
explicit conversion is allowed between access-to-subprogram types with subtype
conformant profiles (see 4.6). Named access types have predefined equality
operators; anonymous access types do not (see 4.5.2).
by:
82 The predefined operations of an access type also include the
assignment operation, qualification, and membership tests. Explicit conversion
is allowed between general access types with matching designated subtypes;
explicit conversion is allowed between access-to-subprogram types with subtype
conformant profiles (see 4.6). Named access types have predefined equality
operators; anonymous access types do not, but they can use the predefined
equality operators for universal_access (see 4.5.2).
Replace paragraph 37: [AI95-00254-01]
The accessibility rules imply that it is not possible to use the
Access attribute to implement "downward closures" -- that is, to pass a
more-nested subprogram as a parameter to a less-nested subprogram, as might be
desired for example for an iterator abstraction. Instead, downward closures can
be implemented using generic formal subprograms (see 12.6). Note that
Unchecked_Access is not allowed for subprograms.
by:
The Access attribute for subprograms and parameters of an
anonymous access-to-subprogram type may together be used to implement
"downward closures" -- that is, to pass a more-nested
subprogram as a parameter to a less-nested subprogram,
as might be appropriate for an iterator abstaction or
numerical integration. Downward closures can also be implemented
using generic formal subprograms (see 12.6). Note that Unchecked_Access is
not allowed for subprograms.
Section 4: Names and Expressions
4.1 Names
Replace paragraph 11: [AI95-00415-01]
The evaluation of a name determines the entity denoted by the
name. This evaluation has no other effect for a name that
is a direct_name or a character_literal.
by:
The evaluation of a name determines the entity denoted by the
name. This evaluation has no other effect for a name that
is a direct_name or a character_literal.
4.1.3 Selected Components
Insert after paragraph 9: [AI95-00252-01; AI95-00407-01]
-
The prefix shall resolve to denote an object or value of some
task or protected type (after any implicit dereference). The selector_name
shall resolve to denote an entry_declaration or
subprogram_declaration occurring (implicitly or explicitly) within the
visible part of that type. The selected_component denotes the
corresponding entry, entry family, or protected subprogram.
the new paragraph:
-
A view of a subprogram whose first formal parameter is of a tagged
type or is an access parameter whose designated type is tagged:
The prefix (after any implicit dereference) shall resolve to denote an
object or value of a specific tagged type T or class-wide type T'Class.
The selector_name shall resolve to denote a view of a subprogram declared
immediately within the declarative region in which an ancestor of the type
T is declared. The first formal parameter of the subprogram shall be of
type T, or a class-wide type that covers T, or an access parameter
designating one of these types. The designator of the subprogram shall not be
the same as that of a component of the tagged type visible at the point of the
selected_component. The selected_component denotes a view of this
subprogram that omits the first formal parameter. This view is called a
prefixed view of the subprogram, and the prefix of the
selected_component (after any implicit dereference) is called the
prefix of the prefixed view.
Insert after paragraph 13: [AI95-00252-01; AI95-00407-01]
If the prefix does not denote a package, then it shall be a
direct_name or an expanded name, and it shall resolve to denote a program
unit (other than a package), the current instance of a type, a
block_statement, a loop_statement, or an accept_statement (in
the case of an accept_statement or entry_body, no family index is
allowed); the expanded name shall occur within the declarative region of this
construct. Further, if this construct is a callable construct and the
prefix denotes more than one such enclosing callable construct, then the
expanded name is ambiguous, independently of the selector_name.
the new paragraph:
For a subprogram whose first parameter is an access parameter, the prefix of
any prefixed view shall denote an aliased view of an object.
For a subprogram whose first parameter is of mode in out or out, or of
an anonymous access-to-variable type, the prefix of any prefixed view shall
denote a variable.
In paragraph 17 replace: [AI95-00252-01; AI95-00407-01]
Control.Seize -- an entry of a protected object (see 9.4)
by:
X.Activate -- a prefixed view of a procedure (see 6.4)
-- assuming X has a tagged type
Control.Seize -- an entry of a protected object (see 9.4)
4.1.4 Attributes
Replace paragraph 14: [AI95-00235-01]
5 In general, the name in a prefix of an attribute_reference (or a
range_attribute_reference) has to be resolved without using any context.
However, in the case of the Access attribute, the expected type for the
prefix has to be a single access type, and if it is an
access-to-subprogram type (see 3.10.2) then the resolution of the name can
use the fact that the profile of the callable entity denoted by the prefix has
to be type conformant with the designated profile of the access type.
by:
5 In general, the name in a prefix of an attribute_reference (or a
range_attribute_reference) has to be resolved without using any context.
However, in the case of the Access attribute, the expected type for the
attribute_reference has to be a single access type, and the resolution
of the name can use the fact that the type of the object or profile of the
callable entity denoted by the prefix has to be match the designated
type or be type conformant with the designated profile of the access type.
4.2 Literals
Delete paragraph 2: [AI95-00230-01]
The expected type for a literal null shall be a single access type.
Delete paragraph 7: [AI95-00230-01; AI95-00231-01]
A literal null shall not be of an anonymous access type, since such types
do not have a null value (see 3.10).
Replace paragraph 8: [AI95-00230-01]
An integer literal is of type universal_integer. A real literal is of type
universal_real.
by:
An integer literal is of type universal_integer. A real literal is of type
universal_real. The literal null is of type universal_access.
4.3 Aggregates
Replace paragraph 3: [AI95-00287-01]
The expected type for an aggregate shall be a single nonlimited array
type, record type, or record extension.
by:
The expected type for an aggregate shall be a single array type, record
type, or record extension.
4.3.1 Record Aggregates
Replace paragraph 4: [AI95-00287-01]
record_component_association ::=
[ component_choice_list => ] expression
by:
record_component_association ::=
[ component_choice_list => ] expression
| component_choice_list => <>
Replace paragraph 8: [AI95-00287-01]
The expected type for a record_aggregate shall be a single nonlimited
record type or record extension.
by:
The expected type for a record_aggregate shall be a single
record type or record extension.
Replace paragraph 16: [AI95-00287-01]
Each record_component_association shall have at least one associated
component, and each needed component shall be associated with exactly one
record_component_association. If a record_component_association has
two or more associated components, all of them shall be of the same type.
by:
Each record_component_association other than an others choice with
a <> shall have at least one associated component, and each needed component
shall be associated with exactly one record_component_association. If a
record_component_association with an expression has two or more associated
components, all of them shall be of the same type.
Insert after paragraph 17: [AI95-00287-01]
If the components of a variant_part are needed, then the value of a
discriminant that governs the variant_part shall be given by a static
expression.
the new paragraph:
A record_component_association for a discriminant without a
default_expression shall have an expression rather than <>.
Insert before paragraph 20: [AI95-00287-01]
The expression of a record_component_association is evaluated (and
converted) once for each associated component.
the new paragraph:
For a record_component_association with an expression, the
expression defines the value for the associated component(s). For a
record_component_association with <>, if the component_declaration
has a default_expression, that default_expression defines the value
for the associated component(s); otherwise, the associated component(s) are
initialized by default as for a stand-alone object of the component subtype
(see 3.3.1).
Insert after paragraph 29: [AI95-00287-01]
-- The allocator is evaluated twice: Succ and Pred designate different cells
the new paragraphs:
(Value => 0, Succ|Pred => <>) -- see 3.10.1
-- Succ and Pred will be set to null
4.3.2 Extension Aggregates
Replace paragraph 4: [AI95-00287-01]
The expected type for an extension_aggregate shall be a single nonlimited
type that is a record extension. If the ancestor_part is an
expression, it is expected to be of any nonlimited tagged type.
by:
The expected type for an extension_aggregate shall be a single type that
is a record extension. If the ancestor_part is an expression, it is
expected to be of any tagged type.
Replace paragraph 5: [AI95-00306-01]
If the ancestor_part is a subtype_mark, it shall denote a specific
tagged subtype. The type of the extension_aggregate shall be derived from
the type of the ancestor_part, through one or more record extensions (and
no private extensions).
by:
If the ancestor_part is a subtype_mark, it shall denote a specific
tagged subtype. If the ancestor_part is an expression, it shall not
be dynamically tagged. The type of the extension_aggregate shall be
derived from the type of the ancestor_part, through one or more record
extensions (and no private extensions).
4.3.3 Array Aggregates
Replace paragraph 3: [AI95-00287-01]
positional_array_aggregate ::=
(expression, expression {, expression})
| (expression {, expression}, others => expression)
by:
positional_array_aggregate ::=
(expression, expression {, expression})
| (expression {, expression}, others => expression)
| (expression {, expression}, others => <>)
Replace paragraph 5: [AI95-00287-01]
array_component_association ::=
discrete_choice_list => expression
by:
array_component_association ::=
discrete_choice_list => expression
| discrete_choice_list => <>
Replace paragraph 7: [AI95-00287-01]
The expected type for an array_aggregate (that is not a subaggregate)
shall be a single nonlimited array type. The component type of this array type
is the expected type for each array component expression of the
array_aggregate.
by:
The expected type for an array_aggregate (that is not a subaggregate)
shall be a single array type. The component type of this array type is the
expected type for each array component expression of the array_aggregate.
Insert before paragraph 24: [AI95-00287-01]
The bounds of the index range of an array_aggregate (including a
subaggregate) are determined as follows:
the new paragraph:
Each expression in an
array_component_association defines the value for the associated
component(s). For an array_component_association with <>, the associated
component(s) are initialized by default as for a stand-alone object of the
component subtype (see 3.3.1).
4.5.2 Relational Operators and Membership Tests
Replace paragraph 3: [AI95-00251-01]
The tested type of a membership test is the type of the range or the
type determined by the subtype_mark. If the tested type is tagged, then
the simple_expression shall resolve to be of a type that covers or is
covered by the tested type; if untagged, the expected type for the
simple_expression is the tested type.
by:
The tested type of a membership test is the type of the range or the
type determined by the subtype_mark. If the tested type is tagged, then
then the simple_expression shall resolve to be of a type that is
convertible (see 4.6) to the tested type; if untagged, the expected
type for the simple_expression is the tested type.
Insert after paragraph 7: [AI95-00230-01]
function "=" (Left, Right : T) return Boolean
function "/="(Left, Right : T) return Boolean
the new paragraphs:
The following additional equality operators for the universal_access type
are declared in package Standard for use with anonymous access types:
function "=" (Left, Right : universal_access) return Boolean
function "/="(Left, Right : universal_access) return Boolean
Insert after paragraph 9: [AI95-00230-01]
function "<" (Left, Right : T) return Boolean
function "<="(Left, Right : T) return Boolean
function ">" (Left, Right : T) return Boolean
function ">="(Left, Right : T) return Boolean
the new paragraphs:
At least one of the operands of the equality operators for universal_access
shall be of a specific anonymous access type.
The operands of the equality operators for universal_access shall be
convertible to one another (see 4.6).
Replace paragraph 30: [AI95-00231-01]
-
The tested type is not scalar, and
the value of the @nt<simple_expression
satisfies any constraints
of the named subtype, and, if the type of the @nt<simple_expression>
is class-wide, the value has a tag that identifies a type covered by
the tested type.>
by:
-
The tested type is not scalar, and
the value of the @nt<simple_expression
satisfies any constraints
of the named subtype, and:>
-
if the type of the simple_expression is class-wide, the
value has a tag that identifies a type covered by the tested type;
-
if the tested type is an access type and the named subtype excludes
null, the value of the simple_expression is not null.
4.5.5 Multiplying Operators
Replace paragraph 20: [AI95-00364-01]
The above two fixed-fixed multiplying operators shall not be used in a context
where the expected type for the result is itself universal_fixed -- the
context has to identify some other numeric type to which the result is to be
converted, either explicitly or implicitly.
by:
The above two fixed-fixed multiplying operators shall not be used in a
context where the expected type for the result is itself universal_fixed
-- the context has to identify some other numeric type to which the
result is to be converted, either explicitly or implicitly. An
explicit conversion is required on the result when using the above
fixed-fixed multiplication operator when either operand is of a type having
a user-defined primitive multiplication operator declared immediately
within the same list of declarations as the type and with both formal
parameters of a fixed-point type. A corresponding requirement applies to
the universal fixed-fixed division operator.
4.6 Type Conversions
Replace paragraph 5: [AI95-00330-01]
A type_conversion whose operand is the name of an object is called a
view conversion if both its target type and operand type are tagged, or if
it appears as an actual parameter of mode out or in out; other
type_conversions are called value conversions.
by:
A type_conversion whose operand is the name of an object is called a
view conversion if both its target type and operand type are tagged, or if
it appears as or if it appears in a call as an actual parameter of mode out or in out;
other type_conversions are called value conversions.
Replace paragraph 8: [AI95-00251-01]
If the target type is a numeric type, then the operand type shall be a numeric
type.
by:
In a view conversion for an untagged type, the target type shall be convertible
(back) to the operand type.
Delete paragraph 9: [AI95-00246-01; AI95-00251-01]
If the target type is an array type, then the operand type shall be an array
type. Further:
Delete paragraph 10: [AI95-00251-01]
-
The types shall have the same dimensionality;
Delete paragraph 11: [AI95-00251-01]
-
Corresponding index types shall be convertible;
Delete paragraph 12: [AI95-00246-01; AI95-00251-01; AI95-00392-01]
-
The component subtypes shall statically match; and
Delete paragraph 12.1: [AI95-00246-01; AI95-00251-01; AI95-00363-01]
-
In a view conversion, the target type and the operand type shall both
or neither have aliased components.
Delete paragraph 13: [AI95-00230-01; AI95-00251-01]
If the target type is a general access type, then the operand type shall be an
access-to-object type. Further:
Delete paragraph 14: [AI95-00251-01]
-
If the target type is an access-to-variable type, then the operand
type shall be an access-to-variable type;
Delete paragraph 15: [AI95-00251-01]
-
If the target designated type is tagged, then the operand designated
type shall be convertible to the target designated type;
Delete paragraph 16: [AI95-00251-01; AI95-00363-01; AI95-00384-01]
-
If the target designated type is not tagged, then the designated types
shall be the same, and either the designated subtypes shall statically match or
the target designated subtype shall be discriminated and unconstrained; and
Delete paragraph 17: [AI95-00251-01]
-
The accessibility level of the operand type shall not be statically
deeper than that of the target type. In addition to the places where Legality
Rules normally apply (see 12.3), this rule applies also in the private part of
an instance of a generic unit.
Delete paragraph 18: [AI95-00230-01; AI95-00251-01]
If the target type is an access-to-subprogram type, then the operand type
shall be an access-to-subprogram type. Further:
Delete paragraph 19: [AI95-00251-01]
-
The designated profiles shall be subtype-conformant.
Delete paragraph 20: [AI95-00251-01]
-
The accessibility level of the operand type shall not be statically
deeper than that of the target type. In addition to the places where Legality
Rules normally apply (see 12.3), this rule applies also in the private part of
an instance of a generic unit. If the operand type is declared within a generic
body, the target type shall be declared within the generic body.
Replace paragraph 21: [AI95-00251-01]
If the target type is not included in any of the above four cases, there shall
be a type that is an ancestor of both the target type and the operand type.
Further, if the target type is tagged, then either:
by:
If there is a type that is an ancestor of both the target type and the operand
type, then:
-
The target type shall be untagged; or
Replace paragraph 23: [AI95-00251-01]
-
The operand type shall be a class-wide type that covers the target
type.
by:
-
The operand type shall be a class-wide type that covers the target
type; or
-
The operand and target types shall both be class-wide types and the
specific type associated with at least one of them shall be an interface type.
Replace paragraph 24: [AI95-00246-01; AI95-00251-01; AI95-00392-01]
In a view conversion for an untagged type, the target type shall be convertible
(back) to the operand type.
by:
If there is no type that is an ancestor of both the target type
and the operand type, then:
-
If the target type is a numeric type, then the operand type shall be a
numeric type.
-
If the target type is an array type, then the operand type shall be an array
type. Further:
-
The types shall have the same dimensionality;
-
Corresponding index types shall be convertible;
-
The component subtypes shall statically match;
-
If the component types are anonymous access types, then the
accessibility level of the operand type shall not be statically deeper
than that of the target type;
-
Neither the target type nor the operand type shall be limited; and
-
In a view conversion: if the target type has aliased components, then
so shall the operand type; and the operand type shall not have
a tagged, private, or volatile subcomponent.
-
If the target type is universal_access, then the operand type shall be an
access type.
-
If the target type is a general access-to-object type, then
the operand type shall be universal_access or an access-to-object type.
Further, if not universal_access:
-
If the target type is an access-to-variable type, then the operand
type shall be an access-to-variable type;
-
If the target designated type is tagged, then the operand designated
type shall be convertible to the target designated type;
-
If the target designated type is not tagged, then the designated
types shall be the same, and either:
-
the designated subtypes shall statically match; or
-
the designated type shall be discriminated in its full view and
unconstrained in any partial view, and one of the designated
subtypes shall be unconstrained;
-
The accessibility level of the operand type shall not be statically
deeper than that of the target type. In addition to the places where Legality
Rules normally apply (see 12.3), this rule applies also in the private part of
an instance of a generic unit.
-
If the target type is an access-to-subprogram type, then the operand
type shall be universal_access or an access-to-subprogram type. Further, if
not universal_access:
-
The designated profiles shall be subtype-conformant.
-
The accessibility level of the operand type shall not be statically
deeper than that of the target type. In addition to the places where Legality
Rules normally apply (see 12.3), this rule applies also in the private part of
an instance of a generic unit. If the operand type is declared within a generic
body, the target type shall be declared within the generic body.
Insert after paragraph 39: [AI95-00392-01]
-
In either array case, the value of each component of the result is
that of the matching component of the operand value (see 4.5.2).
the new paragraph:
-
If the component types of the array types are anonymous access types,
then a check is made that the accessibility level of the operand type
is not deeper than that of the target type.
Replace paragraph 49: [AI95-00230-01; AI95-00231-01]
-
If the target type is an anonymous access type, a check is made that
the value of the operand is not null; if the target is not an anonymous access
type, then the result is null if the operand value is null.
by:
-
If the operand value is null, the result of the conversion is the null
value of the target type.
Replace paragraph 51: [AI95-00231-01]
After conversion of the value to the target type, if the target subtype is
constrained, a check is performed that the value satisfies this constraint.
by:
After conversion of the value to the target type, if the target subtype is
constrained, a check is performed that the value satisfies this constraint.
If the target subtype excludes the null value, then a check is made that
the value is not null.
Replace paragraph 61: [AI95-00230-01]
22 A ramification of the overload resolution rules is that the operand of an
(explicit) type_conversion cannot be the literal null, an allocator,
an aggregate, a string_literal, a character_literal, or an
attribute_reference for an Access or Unchecked_Access attribute.
Similarly, such an expression enclosed by parentheses is not allowed. A
qualified_expression (see 4.7) can be used instead of such a type_conversion.
by:
22 A ramification of the overload resolution rules is that the operand of an
(explicit) type_conversion cannot be an allocator,
an aggregate, a string_literal, a character_literal, or an
attribute_reference for an Access or Unchecked_Access attribute.
Similarly, such an expression enclosed by parentheses is not allowed. A
qualified_expression (see 4.7) can be used instead of such a type_conversion.
4.8 Allocators
Replace paragraph 5: [AI95-00287-01; AI95-00344-01; AI95-00416-01]
If the type of the allocator is an access-to-constant type, the
allocator shall be an initialized allocator. If the designated type is
limited, the allocator shall be an uninitialized allocator.
by:
If the type of the allocator is an access-to-constant type, the
allocator shall be an initialized allocator.
If the designated type of the type of the allocator is class-wide, the
accessibility level of the type determined by the subtype_indication or
qualified_expression shall not be statically deeper than that of the type
of the allocator.
If the designated subtype of the type of the allocator has one or
more unconstrained access discriminants, then the accessibility level
of the anonymous access type of each access discriminant, as
determined by the subtype_indication or qualified_expression of the
allocator, shall not be statically deeper than that of the type of
the allocator (see 3.10.2).
Replace paragraph 6: [AI95-00363-01]
If the designated type of the type of the allocator is elementary, then
the subtype of the created object is the designated subtype. If the designated
type is composite, then the created object is always constrained; if the
designated subtype is constrained, then it provides the constraint of the
created object; otherwise, the object is constrained by its initial value (even
if the designated subtype is unconstrained with defaults).
by:
If the designated type of the type of the allocator is elementary, then
the subtype of the created object is the designated subtype. If the designated
type is composite, then the subtype of the created object is the designated
subtype when the designated subtype is constrained or there is a partial view
of the designated type that is constrained; otherwise, the created object is
constrained by its initial value (even if the designated subtype is
unconstrained with defaults).
Replace paragraph 7: [AI95-00344-01; AI95-00416-01]
For the evaluation of an allocator, the elaboration of the
subtype_indication or the evaluation of the qualified_expression is
performed first. For the evaluation of an initialized allocator, an object of
the designated type is created and the value of the qualified_expression
is converted to the designated subtype and assigned to the object.
by:
For the evaluation of an allocator, the elaboration of the
subtype_indication or the evaluation of the qualified_expression is
performed first. For the evaluation of an initialized allocator, an object of
the designated type is created and the value of the qualified_expression
is converted to the designated subtype and assigned to the object. If the
designated type of the type of the allocator is class-wide, then
a check is made that the accessibility level of the type identified by
the tag of the value of the qualified_expression is not deeper than that
of the type of the allocator. If the
designated subtype of the allocator has one or more unconstrained
access discriminants, then a check is made that the accessibility
level of the anonymous access type of each access discriminant is
not deeper than that of the type of the allocator.
Program_Error is raised if either such check fails.
Replace paragraph 11: [AI95-00280-01]
If the created object contains any tasks, they are activated (see 9.2).
Finally, an access value that designates the created object is returned.
by:
If the object created by the allocator has a controlled or protected part,
and the finalization of the collection of the type of the allocator (see
7.6.1) has started, Program_Error is raised.
If the created object contains any tasks, and the master of the type
of the allocator has finished waiting for dependent tasks (see 9.3),
Program_Error is raised.
If the created object contains any tasks, they are activated (see 9.2).
Finally, an access value that designates the created object is returned.
Bounded (Run-Time) Errors
It is a bounded error if the finalization of the collection of the type
(see 7.6.1) of the allocator has started. If the error is detected,
Program_Error is raised. Otherwise, the allocation proceeds normally.
4.9 Static Expressions and Static Subtypes
Replace paragraph 26: [AI95-00263-01]
A static subtype is either a static scalar subtype or a static
string subtype. A static scalar subtype is an unconstrained scalar subtype
whose type is not a descendant of a formal scalar type, or a constrained
scalar subtype formed by imposing a compatible static constraint on a static
scalar subtype. A static string subtype is an unconstrained string subtype
whose index subtype and component subtype are static (and whose type is not a
descendant of a formal array type), or a constrained string subtype formed by
imposing a compatible static constraint on a static string subtype. In any
case, the subtype of a generic formal object of mode in out, and the result
subtype of a generic formal function, are not static.
by:
A static subtype is either a static scalar subtype or a static
string subtype. A static scalar subtype is an unconstrained scalar subtype
whose type is not a descendant of a formal type, or a constrained
scalar subtype formed by imposing a compatible static constraint on a static
scalar subtype. A static string subtype is an unconstrained string subtype
whose index subtype and component subtype are static, or a constrained string
subtype formed by imposing a compatible static constraint on a static string
subtype. In any case, the subtype of a generic formal object of mode in
out, and the result subtype of a generic formal function, are not static.
Insert after paragraph 31: [AI95-00311-01]
-
A discriminant constraint is static if each expression of the
constraint is static, and the subtype of each discriminant is static.
the new paragraph:
In any case, the constraint of the first subtype of a scalar formal type is
neither static nor null.
Replace paragraph 35: [AI95-00269-01]
-
If the expression is not part of a larger static expression,
then its value shall be in the base range of its expected type. Otherwise,
the value may be arbitrarily large or small.
by:
-
If the expression is not part of a larger static expression and the
expression is expected to be of a single specific type, then its value shall be
in the base range of its expected type. Otherwise, the value may be arbitrarily
large or small.
Replace paragraph 37: [AI95-00269-01]
The last two restrictions above do not apply if the expected type is a
descendant of a formal scalar type (or a corresponding actual type in an
instance).
by:
The last restriction above does not apply if the expected type is a
descendant of a formal scalar type (or a corresponding actual type in an
instance).
In addition to the places where Legality Rules normally apply (see 12.3),
the above restrictions also apply in the private part of an instance
of a generic unit.
Replace paragraph 38: [AI95-00268-01; AI95-00269-01]
For a real static expression that is not part of a larger static
expression, and whose expected type is not a descendant of a formal scalar
type, the implementation shall round or truncate the value (according to the
Machine_Rounds attribute of the expected type) to the nearest machine number
of the expected type; if the value is exactly half-way between two machine
numbers, any rounding shall be performed away from zero. If the expected type
is a descendant of a formal scalar type, no special rounding or truncating is
required - normal accuracy rules apply (see Annex G).
by:
For a real static expression that is not part of a larger static
expression, and whose expected type is not a descendant of a formal scalar
type, the implementation shall round or truncate the value (according to the
Machine_Rounds attribute of the expected type) to the nearest machine number
of the expected type; if the value is exactly half-way between two machine
numbers, the rounding performed is implementation-defined. If the expected type
is a descendant of a formal scalar type, or if the static expression appears in
the body of an instance of a generic unit and the corresponding expression is
nonstatic in the corresponding generic body, then no special rounding or
truncating is required -- normal accuracy rules apply (see Annex G).
For a real static expression that is not part of a larger static
expression, and whose expected type is not a descendant of a formal scalar
type, the rounding should be the same as the default rounding for the target
system.
4.9.1 Statically Matching Constraints and Subtypes
Replace paragraph 1: [AI95-00311-01]
A constraint statically matches another constraint if both are null
constraints, both are static and have equal corresponding bounds or
discriminant values, or both are nonstatic and result from the same elaboration
of a constraint of a subtype_indication or the same evaluation of a
range of a discrete_subtype_definition.
by:
A constraint statically matches another constraint if:
-
both are null constraints;
-
both are static and have equal corresponding bounds or discriminant
values;
-
both are nonstatic and result from the same elaboration
of a constraint of a subtype_indication or the same evaluation of a
range of a discrete_subtype_definition; or
-
both are nonstatic and both come from the same
formal_type_declaration.
Replace paragraph 2: [AI95-00231-01; AI95-00254-01]
A subtype statically matches another subtype of the same type if they have
statically matching constraints. Two anonymous access subtypes statically match
if their designated subtypes statically match.
by:
A subtype statically matches another subtype of the same type if they have
statically matching constraints, and, for access subtypes, either both or
neither exclude null. Two anonymous access-to-object subtypes statically match
if their designated subtypes statically match, and either both or neither
exclude null, and either both or neither are access-to-constant. Two anonymous
access-to-subprogram subtypes statically match if their designated profiles are
subtype conformant, and either both or neither exclude null.
Section 5: Statements
5.2 Assignment Statements
Replace paragraph 4: [AI95-00287-01]
The variable_name of an assignment_statement is expected to be
of any nonlimited type. The expected type for the expression is the type
of the target.
by:
The variable_name of an assignment_statement is expected to be
of any type. The expected type for the expression is the type of the
target.
Replace paragraph 5: [AI95-00287-01]
The target denoted by the variable_name shall be a variable.
by:
The target denoted by the variable_name shall be a variable of a
nonlimited type.
Section 6: Subprograms
6.1 Subprogram Declarations
Replace paragraph 2: [AI95-00218-03]
subprogram_declaration ::= subprogram_specification ;
by:
overriding_indicator ::= [not] overriding
subprogram_declaration ::=
[overriding_indicator]
subprogram_specification ;
Replace paragraph 3: [AI95-00218-03]
abstract_subprogram_declaration ::= subprogram_specification is abstract;
by:
abstract_subprogram_declaration ::=
[overriding_indicator]
subprogram_specification is abstract;
Replace paragraph 4: [AI95-00348-01]
subprogram_specification ::=
procedure defining_program_unit_name parameter_profile
| function defining_designator parameter_and_result_profile
by:
procedure_specification ::= procedure defining_program_unit_name parameter_profile
function_specification ::= function defining_designator parameter_and_result_profile
subprogram_specification ::=
procedure_specification
| function_specification
Replace paragraph 10: [AI95-00395-01]
The sequence of characters in an operator_symbol shall correspond to an
operator belonging to one of the six classes of operators defined in clause 4.5
(spaces are not allowed and the case of letters is not significant).
by:
The sequence of characters in an operator_symbol shall be identical, after
conversion to upper case, to the characters of one the six classes
of operators defined in 4.5 (in upper case). Spaces are not allowed. One or
more characters in category other_format may be inserted after any
graphic_character in the sequence of characters of the operator_symbol
if the sequence of characters of the operator_symbol is a reserved word.
Replace paragraph 13: [AI95-00231-01; AI95-00318-02]
parameter_and_result_profile ::= [formal_part] return subtype_mark
by:
parameter_and_result_profile ::=
[formal_part] return [null_exclusion] subtype_mark
| [formal_part] return access_definition
Replace paragraph 15: [AI95-00231-01]
parameter_specification ::=
defining_identifier_list : mode subtype_mark [:= default_expression]
| defining_identifier_list : access_definition [:= default_expression]
by:
parameter_specification ::=
defining_identifier_list : mode [null_exclusion] subtype_mark [:= default_expression]
| defining_identifier_list : access_definition [:= default_expression]
Replace paragraph 23: [AI95-00231-01; AI95-00318-02]
The nominal subtype of a formal parameter is the subtype denoted by the
subtype_mark, or defined by the access_definition, in the
parameter_specification.
by:
The nominal subtype of a formal parameter is the subtype determined
by the optional null_exclusion and the subtype_mark, or
defined by the access_definition, in the parameter_specification.
The nominal subtype of a function result is the subtype
determined by the optional null_exclusion and the subtype_mark, or
defined by the access_definition, in the parameter_and_result_profile.
Replace paragraph 24: [AI95-00231-01; AI95-00254-01; AI95-00318-02]
An access parameter is a formal in parameter specified by an
access_definition. An access parameter is of an anonymous general
access-to-variable type (see 3.10). Access parameters allow dispatching calls
to be controlled by access values.
by:
An access parameter is a formal in parameter specified by an
access_definition. An access result type is a function result type
specified by an access_definition. An access parameter or result type is
of an anonymous access type (see 3.10). Access parameters of an
access-to-object type allow dispatching calls to
be controlled by access values. Access parameters of an access-to-subprogram
type permit calls to subprograms passed as parameters irrespective of their
accessibility level.
Replace paragraph 27: [AI95-00254-01]
-
For any access parameters, the designated subtype of the parameter
type.
by:
-
For any access parameters of an access-to-object type, the designated
subtype of the parameter type.
-
For any access parameters of an access-to-subprogram type, the
subtypes of the profile of the parameter type.
Replace paragraph 28: [AI95-00231-01; AI95-00254-01; AI95-00318-02]
-
For any result, the result subtype.
by:
-
For any non-access result, the nominal subtype of the function result.
-
For any access result type of an access-to-object type, the
designated subtype of the result type.
-
For any access result type of an access-to-subprogram type, the
subtypes of the profile of the result type.
Insert after paragraph 30: [AI95-00218-03]
A subprogram declared by an abstract_subprogram_declaration is abstract; a
subprogram declared by a subprogram_declaration is not. See 3.9.3,
"Abstract Types and Subprograms".
the new paragraph:
An overriding_indicator is used to indicate whether overriding is
intended. See 8.3, "Visibility".
6.3 Subprogram Bodies
Replace paragraph 2: [AI95-00218-03]
subprogram_body ::=
subprogram_specification is
declarative_part
begin
handled_sequence_of_statements
end [designator];
by:
subprogram_body ::=
[overriding_indicator]
subprogram_specification is
declarative_part
begin
handled_sequence_of_statements
end [designator];
6.3.1 Conformance Rules
Replace paragraph 10: [AI95-00252-01; AI95-00407-01]
-
a subprogram declared immediately within a protected_body.
by:
-
a subprogram declared immediately within a protected_body;
-
any prefixed view of a subprogram (see 4.1.3).
Insert after paragraph 13: [AI95-00254-01; AI95-00409-01]
-
The default calling convention is entry for an entry.
the new paragraph:
-
The calling convention for an access parameter or access result of an
access-to-subprogram type is protected if the reserved word protected
appears in its definition and otherwise is the convention of the subprogram
that contains the parameter.
Replace paragraph 15: [AI95-00409-01]
Two profiles are type conformant if they have the same number of
parameters, and both have a result if either does, and corresponding parameter
and result types are the same, or, for access parameters, corresponding
designated types are the same.
by:
Two profiles are type conformant if they have the same number of
parameters, and both have a result if either does, and corresponding parameter
and result types are the same, or, for access parameters or access results,
corresponding designated types are the same, or corresponding designated
profiles are type conformant.
Replace paragraph 16: [AI95-00318-02; AI95-00409-01]
Two profiles are mode conformant if they are type-conformant, and
corresponding parameters have identical modes, and, for access parameters, the
designated subtypes statically match.
by:
Two profiles are mode conformant if they are type-conformant,
corresponding parameters have identical modes, and, for access parameters or
access result types, the designated subtypes statically match, or the
designated profiles are subtype conformant.
Insert after paragraph 24: [AI95-00345-01; AI95-00397-01]
Two discrete_subtype_definitions are fully conformant if they are
both subtype_indications or are both ranges, the subtype_marks
(if any) denote the same subtype, and the corresponding simple_expressions
of the ranges (if any) fully conform.
the new paragraph:
The prefixed view profile of a subprogram is the profile obtained by
omitting the first parameter of that subprogram. There is no prefixed view
profile for a parameterless subprogram. For the purposes of defining subtype
and mode conformance, the convention of a prefixed view profile is considered
to match that of either an entry or a protected operation.
6.3.2 Inline Expansion of Subprograms
Insert after paragraph 6: [AI95-00309-01]
For each call, an implementation is free to follow or to ignore the
recommendation expressed by the pragma.
the new paragraph:
An implementation may allow a pragma Inline that has an argument which
is a direct_name denoting a subprogram_body of the same
declarative_part.
6.4 Subprogram Calls
Replace paragraph 8: [AI95-00310-01]
The name or prefix given in a procedure_call_statement shall
resolve to denote a callable entity that is a procedure, or an entry renamed as
(viewed as) a procedure. The name or prefix given in a
function_call shall resolve to denote a callable entity that is a
function. When there is an actual_parameter_part, the prefix can be an
implicit_dereference of an access-to-subprogram value.
by:
The name or prefix given in a procedure_call_statement shall
resolve to denote a callable entity that is a procedure, or an entry renamed as
(viewed as) a procedure. The name or prefix given in a
function_call shall resolve to denote a callable entity that is a
function. The name or prefix shall not resolve to denote an abstract
subprogram unless it is also a dispatching subprogram. When there is an
actual_parameter_part, the prefix can be an implicit_dereference
of an access-to-subprogram value.
Insert after paragraph 10: [AI95-00407-01]
For the execution of a subprogram call, the name or prefix of the
call is evaluated, and each parameter_association is evaluated (see
6.4.1). If a default_expression is used, an implicit
parameter_association is assumed for this rule. These evaluations are done
in an arbitrary order. The subprogram_body is then executed. Finally, if
the subprogram completes normally, then after it is left, any necessary
assigning back of formal to actual parameters occurs (see 6.4.1).
the new paragraph:
If the name or prefix of a subprogram call denotes a prefixed view
(see 4.1.3), the subprogram call is equivalent to a call on the underlying
subprogram, with the first actual parameter being provided by the the prefix of
the prefixed view (or the Access attribute of this prefix if the first formal
parameter is an access parameter), and the remaining actual parameters given by
the actual_parameter_part, if any.
Replace paragraph 12: [AI95-00231-01]
A function_call denotes a constant, as defined in 6.5; the nominal subtype
of the constant is given by the result subtype of the function.
by:
A function_call denotes a constant, as defined in 6.5; the nominal subtype
of the constant is given by the nominal subtype of the function result.
6.5 Return Statements
Replace paragraph 2: [AI95-00318-02]
return_statement ::= return [expression];
by:
return_statement ::= simple_return_statement | extended_return_statement
simple_return_statement ::= return [expression];
extended_return_statement ::=
return identifier : [aliased] return_subtype_indication [:= expression] [do
handled_sequence_of_statements
end return];
return_subtype_indication ::= subtype_indication | access_definition
Replace paragraph 3: [AI95-00318-02]
The expression, if any, of a return_statement is called the return
expression. The result subtype of a function is the subtype denoted by the
subtype_mark after the reserved word return in the profile of the
function. The expected type for a return expression is the result type of the
corresponding function.
by:
The result subtype of a function is the subtype denoted by the
subtype_mark, or defined by the access_definition, after the reserved
word return in the profile of the function. The expression, if any, of
a simple_return_statement or extended_return_statement is called the
return expression. The expected type for a return expression is the result
type of the corresponding function.
Replace paragraph 4: [AI95-00318-02]
A return_statement shall be within a callable construct, and it applies
to the innermost one. A return_statement shall not be within a body that
is within the construct to which the return_statement applies.
by:
A return_statement shall be within a callable construct, and it applies
to the innermost callable construct or extended_return_statement that
contains it. A return_statement shall not be within a body that is within
the construct to which the return_statement applies.
Replace paragraph 5: [AI95-00318-02; AI95-00416-01]
A function body shall contain at least one return_statement that applies
to the function body, unless the function contains code_statements. A
return_statement shall include a return expression if and only if
it applies to a function body.
by:
A function body shall contain at least one return_statement that applies
to the function body, unless the function contains code_statements. A
simple_return_statement shall include a return expression if and only if
it applies to a function body. An extended_return_statement shall apply to
a function body.
If the result subtype of a function is defined by a subtype_mark, the
return_subtype_indication of an extended_return_statement that
applies to the function body shall be a subtype_indication. The type of
the subtype_indication shall be the result type of the function. If the
result subtype of the function is constrained, then the subtype defined by the
subtype_indication shall also be constrained and shall statically match
this result subtype. If the result subtype of the function is unconstrained,
then the subtype defined by the subtype_indication shall be a definite
subtype, or there shall be a return expression.
If the result subtype of the function is defined by an access_definition,
the return_subtype_indication shall be an access_definition. The
subtype defined by the access_definition shall statically match the result
subtype of the function. The accessibility level of this anonymous access
subtype is that of the result subtype.
If the type of the return expression is limited, then the return expression
shall be an aggregate, a function call (or equivalent use of an operator),
or a qualified_expression or parenthesized expression whose operand is one
of these.
If the result type is class-wide, the accessibility level of the
type of the return expression shall not be statically deeper than
that of the master that elaborated the function body. If the result
subtype has one or more unconstrained access discriminants, the
accessibility level of the anonymous access type of each access
discriminant, as determined by the return_subtype_indication or the
return expression, shall not be statically deeper than that of the
master that elaborated the function body.
Within an extended_return_statement, the return object is declared
with the given identifier, with nominal subtype defined by the
return_subtype_indication.
Replace paragraph 6: [AI95-00318-02; AI95-00416-01]
For the execution of a return_statement, the expression (if any) is
first evaluated and converted to the result subtype.
by:
For the execution of an extended_return_statement, the
subtype_indication or access_definition is elaborated. This creates
the nominal subtype of the return object. If there is a return expression,
it is evaluated and converted
to the nominal subtype (which might raise Constraint_Error -- see 4.6) and
becomes the initial value of the return object; otherwise, the return object is
initialized by default as for a stand-alone object of its nominal subtype
(see 3.3.1). If the nominal subtype is indefinite, the return object is
constrained by its initial value. The handled_sequence_of_statements, if
any, is then executed.
For the execution of a simple_return_statement, the expression
(if any) is first evaluated and converted to the result subtype to become
the value of the anonymous return object.
If the return object has any parts that are tasks, the activation
of those tasks does not occur until after the function returns (see 9.2).
Delete paragraph 7: [AI95-00318-02]
If the result type is class-wide, then the tag of the result is the tag of the
value of the expression.
Replace paragraph 8: [AI95-00318-02]
If the result type is a specific tagged type:
by:
If the result type of a function is a specific tagged type, the
tag of the return object is that of the result type.
Delete paragraph 9: [AI95-00318-02]
-
If it is limited, then a check is made that the tag of the value of
the return expression identifies the result type. Constraint_Error is raised
if this check fails.
Delete paragraph 10: [AI95-00318-02]
-
If it is nonlimited, then the tag of the result is that of the result
type.
Delete paragraph 11: [AI95-00318-02]
A type is a return-by-reference type if it is a descendant of one of the
following:
Delete paragraph 12: [AI95-00318-02]
Delete paragraph 13: [AI95-00318-02]
-
a task or protected type;
Delete paragraph 14: [AI95-00318-02]
-
a nonprivate type with the reserved word limited in its
declaration;
Delete paragraph 15: [AI95-00318-02]
-
a composite type with a subcomponent of a return-by-reference type;
Delete paragraph 16: [AI95-00318-02]
-
a private type whose full type is a return-by-reference type.
Delete paragraph 17: [AI95-00318-02]
If the result type is a return-by-reference type, then a check is made that the
return expression is one of the following:
Delete paragraph 18: [AI95-00162-01; AI95-00316-01; AI95-00318-02]
-
a name that denotes an object view whose accessibility level is
not deeper than that of the master that elaborated the function body; or
Delete paragraph 19: [AI95-00318-02]
-
a parenthesized expression or qualified_expression whose operand
is one of these kinds of expressions.
Replace paragraph 20: [AI95-00318-02; AI95-00344-01; AI95-00402-01; AI95-00416-01]
The exception Program_Error is raised if this check fails.
by:
If the result type is class-wide, a check is made that the accessibility level
of the type identified by the tag of the result is not deeper than that of the
master that elaborated the function body. If the result subtype has one or more
unconstrained access discriminants, a check is made that the accessibility
level of the anonymous access type of each access discriminant, as determined
by the return_subtype_indication or return expression, is not deeper than
that of the master that elaborated the function body. If either check fails,
Program_Error is raised.
Delete paragraph 21: [AI95-00318-02]
For a function with a return-by-reference result type the result is returned by
reference; that is, the function call denotes a constant view of the object
associated with the value of the return expression. For any other function, the
result is returned by copy; that is, the converted value is assigned into an
anonymous constant created at the point of the return_statement, and the
function call denotes that object.
Replace paragraph 22: [AI95-00318-02; AI95-00416-01]
Finally, a transfer of control is performed which completes the
execution of the construct to which the return_statement applies,
and returns to the caller.
by:
Finally, a transfer of control is performed which completes the
execution of the construct to which the return_statement applies,
and returns to the caller. In the case of a function, the
function_call denotes a constant view of the return object.
Implementation Permission
If the result subtype of a function is unconstrained,
and a call on the function is used to provide the initial value of
an object with a constrained nominal subtype, Constraint_Error may
be raised at the point of the call while elaborating a
return_subtype_indication or evaluating a return expression within
the function, if it is determined that the value of the result will
violate the constraint of this object's subtype.
Replace paragraph 24: [AI95-00318-02]
return; -- in a procedure body, entry_body, or accept_statement
return Key_Value(Last_Index); -- in a function body
by:
return; -- in a procedure body, entry_body,
-- accept_statement, or extended_return_statement
return Key_Value(Last_Index); -- in a function body
return Node : Cell do -- in a function body, see 3.10.1 for Cell
Node.Value := Result;
Node.Succ := Next_Node;
end return;
6.5.1 Pragma No_Return
Insert new clause: [AI95-00329-01; AI95-00414-01]
A pragma No_Return indicates that a procedure cannot return normally;
it may propagate an exception or loop forever.
The form of a pragma No_Return, which is a representation pragma (see
13.1), is as follows:
pragma No_Return(local_name{, local_name});
Each local_name shall denote one or more procedures or
generic procedures; the denoted entities are "non-returning".
The local_name shall not denote a null procedure nor
an instance of a generic unit.
A return_statement shall not apply to a non-returning procedure or generic
procedure.
A procedure shall be non-returning if it overrides a dispatching
non-returning procedure. In addition to the places where Legality
Rules normally apply (see 12.3), this rule applies also in the private
part of an instance of a generic unit.
If a renaming-as-body completes a non-returning procedure declaration,
then the renamed procedure shall be non-returning.
If a generic procedure is non-returning, then so are its instances.
If a procedure declared within a generic unit is non-returning,
then so are the corresponding copies of that procedure in instances.
If the body of a non-returning procedure completes normally,
Program_Error is raised at the point of the call.
If an imported non-returning procedure returns normally,
execution is erroneous.
6.7 Null Procedures
Insert new clause: [AI95-00348-01]
A null_procedure_declaration provides a shorthand to declare a procedure
with an empty body.
null_procedure_declaration ::= procedure_specification is null;
A null_procedure_declaration declares a null procedure.
A completion is not allowed for a null_procedure_declaration.
The execution of a null procedure is invoked by a subprogram call.
For the execution of a subprogram call on a null procedure, the execution of
the subprogram_body has no effect.
Section 7: Packages
7.3 Private Types and Private Extensions
Replace paragraph 2: [AI95-00251-01; AI95-00419-01]
private_extension_declaration ::=
type defining_identifier [discriminant_part] is
[abstract] new ancestor_subtype_indication with private;
by:
private_extension_declaration ::=
type defining_identifier [discriminant_part] is
[abstract] [limited] new ancestor_subtype_indication [and interface_list] with private;
Replace paragraph 6: [AI95-00419-01]
A private type is limited if its declaration includes the reserved word
limited; a private extension is limited if its ancestor type is limited. If
the partial view is nonlimited, then the full view shall be nonlimited. If a
tagged partial view is limited, then the full view shall be limited. On the
other hand, if an untagged partial view is limited, the full view may be
limited or nonlimited.
by:
A private type is limited if its declaration includes the reserved
word limited; a private extension is limited if its ancestor type is a
limited type that is not an interface type, or if the reserved word limited
appears in its definition. If the partial view is nonlimited, then the full
view shall be nonlimited. If a tagged partial view is limited, then the full
view shall be limited. On the other hand, if an untagged partial view is
limited, the full view may be limited or nonlimited.
Insert after paragraph 8: [AI95-00419-01]
The ancestor subtype of a private_extension_declaration is the subtype
defined by the ancestor_subtype_indication; the ancestor type shall be a
specific tagged type. The full view of a private extension shall be derived
(directly or indirectly) from the ancestor type. In addition to the places
where Legality Rules normally apply (see 12.3), the requirement that the
ancestor be specific applies also in the private part of an instance of a
generic unit.
the new paragraph:
If the reserved word limited appears in a
private_extension_declaration, the ancestor type shall be a limited type.
Insert after paragraph 10: [AI95-00419-01]
If a private extension inherits known discriminants from the ancestor subtype,
then the full view shall also inherit its discriminants from the ancestor
subtype, and the parent subtype of the full view shall be constrained if and
only if the ancestor subtype is constrained.
the new paragraph:
If the full view of a private extension is limited, then the reserved word
limited shall appear in the full_type_declaration if and only if it
also appears in the private_extension_declaration.
Replace paragraph 16: [AI95-00401-01]
A private extension inherits components (including discriminants unless there
is a new discriminant_part specified) and user-defined primitive
subprograms from its ancestor type, in the same way that a record extension
inherits components and user-defined primitive subprograms from its parent type
(see 3.4).
by:
A private extension inherits components (including discriminants unless there
is a new discriminant_part specified) and user-defined primitive
subprograms from its ancestor type and its progenitor types (if any), in the
same way that a record extension inherits components and user-defined primitive
subprograms from its parent type and its progenitor types (see 3.4).
Insert after paragraph 20: [AI95-00401-01]
7 The ancestor type specified in a
private_extension_declaration and the parent type specified in the
corresponding declaration of a record extension given in the private part need
not be the same — the parent type of the full view can be any descendant
of the ancestor type. In this case, for a primitive subprogram that is
inherited from the ancestor type and not overridden, the formal parameter names
and default expressions (if any) come from the corresponding primitive
subprogram of the specified ancestor type, while the body comes from the
corresponding primitive subprogram of the parent type of the full view. See
3.9.2.
the new paragraph:
8 The progenitor types specified in a
private_extension_declaration and the progenitor types specified in the
corresponding declaration of a record extension given in the private part need
not be the same — the only requirement is that the private extension must
be descended from each interface from which the record extension is
descended.
7.3.1 Private Operations
Replace paragraph 12: [AI95-00287-01]
9 Partial views provide assignment (unless the view is limited),
membership tests, selected components for the selection of discriminants and
inherited components, qualification, and explicit conversion.
9 Partial views provide initialization,
membership tests, selected components for the selection of discriminants and
inherited components, qualification, and explicit conversion.
Nonlimited partial views also provide assignment_statements.
7.4 Deferred Constants
Replace paragraph 5: [AI95-00385-01]
-
The deferred and full constants shall have the same type;
by:
-
The deferred and full constants shall have the same type, or
shall have statically matching anonymous access subtypes;
Replace paragraph 6: [AI95-00385-01]
-
If the subtype defined by the subtype_indication in the deferred
declaration is constrained, then the subtype defined by the
subtype_indication in the full declaration shall match it statically. On
the other hand, if the subtype of the deferred constant is unconstrained, then
the full declaration is still allowed to impose a constraint. The constant
itself will be constrained, like all constants;
by:
-
If the deferred constant declaration includes a subtype_indication
that defines a constrained subtype, then the subtype defined by the
subtype_indication in the full declaration shall match it statically. On
the other hand, if the subtype of the deferred constant is unconstrained, then
the full declaration is still allowed to impose a constraint. The constant
itself will be constrained, like all constants;
Replace paragraph 9: [AI95-00256-01]
The completion of a deferred constant declaration shall
occur before the constant is frozen (see 7.4).
by:
The completion of a deferred constant declaration shall
occur before the constant is frozen (see 13.14).
7.5 Limited Types
Replace paragraph 1: [AI95-00287-01]
A limited type is (a view of) a type for which the assignment operation is not
allowed. A nonlimited type is a (view of a) type for which the assignment
operation is allowed.
by:
A limited type is (a view of) a type for which copying (such as for an
assignment_statement) is not allowed. A nonlimited type is a (view of a) type
for which copying is allowed.
Replace paragraph 2: [AI95-00287-01; AI95-00318-02; AI95-00419-01]
If a tagged record type has any limited components, then the reserved word
limited shall appear in its record_type_definition.
by:
If a tagged record type has any limited components, then the reserved word
limited shall appear in its record_type_definition. If the reserved
word limited appears in the definition of a type extension, its parent type
and any progenitor interfaces shall be limited.
In the following contexts, an expression of a limited
type is not permitted unless it is an aggregate, a function_call,
or a parenthesized expression or qualified_expression whose operand
is permitted by this rule:
-
the initialization expression of an object_declaration
(see 3.3.1)
-
the default_expression of a component_declaration (see 3.8)
-
the expression of a record_component_association (see 4.3.1)
-
the expression for an ancestor_part of an
extension_aggregate (see 4.3.2)
-
an expression of a positional_array_aggregate or the
expression of an array_component_association (see 4.3.3)
-
the qualified_expression of an initialized allocator (see 4.8)
-
the expression of a return_statement (see 6.5)
-
the default_expression or actual parameter for a formal object
of mode in (see 12.4)
Replace paragraph 3: [AI95-00419-01]
A type is limited if it is a descendant of one of the following:
by:
A type is limited if it is one of the following:
Replace paragraph 4: [AI95-00411-01; AI95-00419-01]
-
a type with the reserved word limited in its definition;
by:
-
a type with the reserved word limited, synchronized,
task, or protected in its definition;
Delete paragraph 5: [AI95-00419-01]
-
a task or protected type;
Replace paragraph 6: [AI95-00419-01]
-
a composite type with a limited component.
the new paragraph:
-
a composite type with a limited component;
-
a derived type whose parent is limited and is not an interface.
Insert after paragraph 8: [AI95-00287-01; AI95-00318-02]
There are no predefined equality operators for a limited type.
the new paragraph:
Implementation Requirements
For an aggregate of a limited type used to initialize an object as allowed
above, the implementation shall not create a separate anonymous object for the
aggregate. For a function_call of a type with a part that is of a
task, protected, or limited record type that is used to initialize an object as
allowed above, the implementation shall not create a separate return object
(see 6.5) for the function_call. The aggregate or function_call
shall be constructed directly in the new object.
Replace paragraph 9: [AI95-00287-01; AI95-00318-02]
13 The following are consequences of the rules for limited types:
by:
13 While it is allowed to write initializations of limited objects,
such initializations never copy a limited object. The source of such an
assignment operation must be an aggregate or function_call, and such
aggregates and function_calls must be built directly in the target
object.
Delete paragraph 10: [AI95-00287-01]
-
An initialization expression is not allowed in an
object_declaration if the type of the object is limited.
Delete paragraph 11: [AI95-00287-01]
-
A default expression is not allowed in a
component_declaration if the type of the record component is limited.
Delete paragraph 12: [AI95-00287-01]
-
An initialized allocator is not allowed if the designated type is
limited.
Delete paragraph 13: [AI95-00287-01]
-
A generic formal parameter of mode in must not be of a limited
type.
Delete paragraph 14: [AI95-00287-01]
14 Aggregates are not available for a limited composite type.
Concatenation is not available for a limited array type.
Delete paragraph 15: [AI95-00287-01]
15 The rules do not exclude a default_expression for a formal
parameter of a limited type; they do not exclude a deferred constant of a
limited type if the full declaration of the constant is of a nonlimited type.
7.6 User-Defined Assignment and Finalization
Replace paragraph 5: [AI95-00161-01]
type Controlled is abstract tagged private;
by:
type Controlled is abstract tagged private;
pragma Preelaborable_Initialization(Controlled);
Replace paragraph 6: [AI95-00348-01]
procedure Initialize (Object : in out Controlled);
procedure Adjust (Object : in out Controlled);
procedure Finalize (Object : in out Controlled);
by:
procedure Initialize (Object : in out Controlled) is null;
procedure Adjust (Object : in out Controlled) is null;
procedure Finalize (Object : in out Controlled) is null;
Replace paragraph 7: [AI95-00161-01]
type Limited_Controlled is abstract tagged limited private;
by:
type Limited_Controlled is abstract tagged limited private;
pragma Preelaborable_Initialization(Limited_Controlled);
Replace paragraph 8: [AI95-00348-01]
procedure Initialize (Object : in out Limited_Controlled);
procedure Finalize (Object : in out Limited_Controlled);
private
... -- not specified by the language
end Ada.Finalization;
by:
procedure Initialize (Object : in out Limited_Controlled) is null;
procedure Finalize (Object : in out Limited_Controlled) is null;
private
... -- not specified by the language
end Ada.Finalization;
Replace paragraph 9: [AI95-00348-01; AI95-00360-01]
A controlled type is a descendant of Controlled or Limited_Controlled. The
(default) implementations of Initialize, Adjust, and Finalize have no effect.
The predefined "=" operator of type Controlled always returns True, since this
operator is incorporated into the implementation of the predefined equality
operator of types derived from Controlled, as explained in 4.5.2. The type
Limited_Controlled is like Controlled, except that it is limited and it lacks
the primitive subprogram Adjust.
by:
A controlled type is a descendant of Controlled or Limited_Controlled. The
predefined "=" operator of type Controlled always returns True, since this
operator is incorporated into the implementation of the predefined equality
operator of types derived from Controlled, as explained in 4.5.2. The type
Limited_Controlled is like Controlled, except that it is limited and it lacks
the primitive subprogram Adjust.
A type is said to need finalization if:
-
it is a controlled type, a task type or a protected type; or
-
it has a component that needs finalization; or
-
it is a limited type that has an access discriminant whose designated
type needs finalization; or
-
it is one of a number of language-defined types that are explicitly
defined to need finalization.
Replace paragraph 21: [AI95-00147-01]
-
For an aggregate or function call whose value is assigned into a target object,
the implementation need not create a separate anonymous object if it can safely
create the value of the aggregate or function call directly in the target
object. Similarly, for an assignment_statement, the implementation need not
create an anonymous object if the value being assigned is the result of
evaluating a name denoting an object (the source object) whose storage cannot
overlap with the target. If the source object might overlap with the target
object, then the implementation can avoid the need for an intermediary
anonymous object by exercising one of the above permissions and perform the
assignment one component at a time (for an overlapping array assignment), or
not at all (for an assignment where the target and the source of the assignment
are the same object). Even if an anonymous object is created, the
implementation may move its value to the target object as part of the
assignment without re-adjusting so long as the anonymous object has no aliased
subcomponents.
by:
-
For an aggregate or function call whose value is assigned into a target object,
the implementation need not create a separate anonymous object if it can safely
create the value of the aggregate or function call directly in the target
object. Similarly, for an assignment_statement, the implementation need not
create an anonymous object if the value being assigned is the result of
evaluating a name denoting an object (the source object) whose storage cannot
overlap with the target. If the source object might overlap with the target
object, then the implementation can avoid the need for an intermediary
anonymous object by exercising one of the above permissions and perform the
assignment one component at a time (for an overlapping array assignment), or
not at all (for an assignment where the target and the source of the assignment
are the same object).
Furthermore, an implementation is permitted to omit implicit
Initialize, Adjust, and Finalize calls and associated assignment
operations on an object of nonlimited controlled type provided that:
-
any omitted Initialize call is not a call on a user-defined Initialize
procedure, and
-
any usage of the value of the object after the implicit Initialize or
Adjust call and before any subsequent Finalize call on the object
does not change the external effect of the program, and
-
after the omission of such calls and operations, any execution of
the program that executes an Initialize or Adjust call on an object
or initializes an object by an aggregate will also later execute a
Finalize call on the object and will always do so prior to assigning
a new value to the object, and
-
the assignment operations associated with omitted Adjust calls are
also omitted.
This permission applies to Adjust and Finalize calls even if the
implicit calls have additional external effects.
7.6.1 Completion and Finalization
Replace paragraph 3: [AI95-00162-01; AI95-00416-01]
After execution of a construct or entity is complete, it is left, meaning
that execution continues with the next action, as defined for the execution
that is taking place. Leaving an execution happens immediately after its
completion, except in the case of a master: the execution of a task_body,
a block_statement, a subprogram_body, an entry_body, or an
accept_statement. A master is finalized after it is complete, and before
it is left.
by:
After execution of a construct or entity is complete, it is left, meaning
that execution continues with the next action, as defined for the execution
that is taking place. Leaving an execution happens immediately after its
completion, except in the case of a master: the execution of a body other than
a package_body; the elaboration of a declaration other than the
declaration of a package or of a type; the execution of a statement; or
the evaluation of an expression or range that is not part of an
enclosing expression, range, or simple_statement. A master is
finalized after it is complete, and before it is left.
Replace paragraph 11: [AI95-00280-01]
The order in which the finalization of a master performs finalization of
objects is as follows: Objects created by declarations in the master are
finalized in the reverse order of their creation. For objects that were
created by allocators for an access type whose ultimate ancestor is
declared in the master, this rule is applied as though each such object that
still exists had been created in an arbitrary order at the first freezing
point (see 13.14) of the ultimate ancestor type.
by:
The order in which the finalization of a master performs finalization of
objects is as follows: Objects created by declarations in the master are
finalized in the reverse order of their creation. For objects that were
created by allocators for an access type whose ultimate ancestor is
declared in the master, this rule is applied as though each such object that
still exists had been created in an arbitrary order at the first freezing
point (see 13.14) of the ultimate ancestor type; the finalization of these
objects is called the finalization of the collection.
Replace paragraph 12: [AI95-00256-01]
The target of an assignment statement is finalized before copying in the
new value, as explained in 7.6.
by:
The target of an assignment_statement is finalized before copying in the
new value, as explained in 7.6.
Replace paragraph 13: [AI95-00162-01]
If the object_name in an object_renaming_declaration, or the actual
parameter for a generic formal in out parameter in a
generic_instantiation, denotes any part of an anonymous object created by
a function call, the anonymous object is not finalized until after
it is no longer accessible via any name. Otherwise, an anonymous
object created by a function call or by an aggregate is finalized no later
than the end of the innermost enclosing declarative_item or
statement; if that is a compound_statement, the object is finalized
before starting the execution of any statement within the
compound_statement.
by:
The master of an object is the master enclosing its creation whose
accessibility level (see 3.10.2) is equal to that of the object.
Replace paragraph 13.1: [AI95-00162-01]
If a transfer of control or raising of an exception occurs prior to performing
a finalization of an anonymous object, the anonymous object is finalized as
part of the finalizations due to be performed for the object's innermost
enclosing master.
by:
In the case of a potentially blocking operation which is a master,
finalization of an (anonymous) object occurs before blocking if the last use of
the object occurs before blocking. In particular, for a delay_statement,
any finalization occurs before delaying the task.
In the case of an expression which is a master,
finalization of any (anonymous) objects occurs as the final part of
evaluation of the expression.
Replace paragraph 16: [AI95-00256-01]
-
For an Adjust invoked as part of the initialization of a controlled
object, other adjustments due to be performed might or might not be performed,
and then Program_Error is raised. During its propagation, finalization might or
might not be applied to objects whose Adjust failed. For an Adjust invoked
as part of an assignment statement, any other adjustments due to be performed
are performed, and then Program_Error is raised.
by:
-
For an Adjust invoked as part of assignment operations other than
those invoked as part of an assignment_statement, other adjustments due to
be performed might or might not be performed, and then Program_Error is raised.
During its propagation, finalization might or might not be applied to objects
whose Adjust failed. For an Adjust invoked as part of an
assignment_statement, any other adjustments due to be performed are
performed, and then Program_Error is raised.
Section 8: Visibility Rules
8.1 Declarative Region
Insert after paragraph 4: [AI95-00318-02]
the new paragraph:
-
an extended_return_statement;
8.2 Scope of Declarations
Insert after paragraph 10: [AI95-00408-01]
The scope of a declaration always contains the immediate scope of the
declaration. In addition, for a given declaration that occurs immediately
within the visible part of an outer declaration, or is a public child of an
outer declaration, the scope of the given declaration extends to the end of the
scope of the outer declaration, except that the scope of a library_item
includes only its semantic dependents.
the new paragraph:
The scope of an attribute_definition_clause is identical to the scope of a
declaration that would occur at the point of the
attribute_definition_clause.
8.3 Visibility
Insert after paragraph 12: [AI95-00251-01]
-
An implicit declaration of an inherited subprogram overrides a
previous implicit declaration of an inherited subprogram.
the new paragraphs:
-
If two or more homographs are implicitly declared at the same place:
-
If one is a non-null non-abstract subprogram, then it overrides
all which are null or abstract subprograms.
-
If all are null procedures or abstract subprograms, then any null
procedure overrides all abstract subprograms; if more than one homograph
remains that is not thus overridden, then one is chosen arbitrarily to override
the others.
Replace paragraph 20: [AI95-00217-06; AI95-00412-01]
-
The declaration of a library unit (including a
library_unit_renaming_declaration) is hidden from all visibility except at
places that are within its declarative region or within the scope of a
with_clause that mentions it. For each declaration or renaming of a generic
unit as a child of some parent generic package, there is a corresponding
declaration nested immediately within each instance of the parent. Such a
nested declaration is hidden from all visibility except at places that are
within the scope of a with_clause that mentions the child.
by:
-
The declaration of a library unit (including a
library_unit_renaming_declaration) is hidden from all visibility at
places outside its declarative region that are not within the scope of a
nonlimited_with_clause that mentions it. The limited view of a library
package is hidden from all visibility at places that are not within the scope
of a limited_with_clause that mentions it; in addition, the limited view
is hidden from all visibility within the declarative region of the package, as
well as within the scope of any nonlimited_with_clause that mentions it.
Where the declaration of the limited view of a
package is visible, any name that denotes the package denotes the
limited view, including those provided by a package renaming.
-
For each declaration or renaming of a generic unit as a child of some
parent generic package, there is a corresponding declaration nested immediately
within each instance of the parent. Such a nested declaration is hidden from
all visibility except at places that are within the scope of a with_clause
that mentions the child.
Insert after paragraph 23: [AI95-00195-01; AI95-00408-01]
-
A declaration is also hidden from direct visibility where hidden from
all visibility.
the new paragraph:
An attribute_definition_clause is visible everywhere within its scope.
Replace paragraph 26: [AI95-00218-03; AI95-00251-01; AI95-00377-01]
A non-overridable declaration is illegal if there is a homograph occurring
immediately within the same declarative region that is visible at the place of
the declaration, and is not hidden from all visibility by the non-overridable
declaration. In addition, a type extension is illegal if somewhere within its
immediate scope it has two visible components with the same name. Similarly,
the context_clause for a subunit is illegal if it mentions (in a
with_clause) some library unit, and there is a homograph of the library
unit that is visible at the place of the corresponding stub, and the homograph
and the mentioned library unit are both declared immediately within the same
declarative region. These rules also apply to dispatching operations declared
in the visible part of an instance of a generic unit. However, they do not
apply to other overloadable declarations in an instance; such declarations may
have type conformant profiles in the instance, so long as the corresponding
declarations in the generic were not type conformant.
by:
A non-overridable declaration is illegal if there is a homograph occurring
immediately within the same declarative region that is visible at the place of
the declaration, and is not hidden from all visibility by the non-overridable
declaration. In addition, a type extension is illegal if somewhere within its
immediate scope it has two visible components with the same name. Similarly,
the context_clause for a compilation unit is illegal if it mentions (in a
with_clause) some library unit, and there is a homograph of the library
unit that is visible at the place of the compilation unit, and the homograph
and the mentioned library unit are both declared immediately within the same
declarative region.
If two or more homographs are implicitly declared at the same place (and not
overridden by a non-overridable declaration) then at most one shall be a
non-null non-abstract subprogram. If all are null or abstract, then all of the
null subprograms shall be fully conformant with one another. If all are
abstract, then all of the subprograms shall be fully conformant with one
another.
All of these rules also apply to dispatching operations declared in the visible
part of an instance of a generic unit. However, they do not apply to other
overloadable declarations in an instance; such declarations may have type
conformant profiles in the instance, so long as the corresponding declarations
in the generic were not type conformant.
If a subprogram_declaration, abstract_subprogram_declaration,
subprogram_body, subprogram_body_stub,
subprogram_renaming_declaration, or generic_instantiation of a
subprogram has an overriding_indicator, then:
-
the operation shall be a primitive operation for some type;
-
if the overriding_indicator is overriding, then the operation
shall override a homograph at the point of the declaration or body;
-
if the overriding_indicator is not overriding, then the
operation shall not override any homograph (at any point).
In addition to the places where Legality Rules normally apply, these rules also
apply in the private part of an instance of a generic unit.
8.4 Use Clauses
Replace paragraph 5: [AI95-00217-06]
A package_name of a use_package_clause shall denote a package.
by:
A package_name of a use_package_clause shall denote a nonlimited view of a
package.
Insert after paragraph 7: [AI95-00217-06]
For a use_clause immediately within a declarative region, the scope is the
portion of the declarative region starting just after the use_clause and
extending to the end of the declarative region. However, the scope of a
use_clause in the private part of a library unit does not include the
visible part of any public descendant of that library unit.
the new paragraph:
A package is named in a use_package_clause if it is denoted by a
package_name of that clause. A type is named in a
use_type_clause if it is determined by a subtype_mark of that clause.
Replace paragraph 8: [AI95-00217-06]
For each package denoted by a package_name of a
use_package_clause whose scope encloses a place, each declaration that
occurs immediately within the declarative region of the package is
potentially use-visible at this place if the declaration is visible at this
place. For each type T or T'Class determined by a subtype_mark of
a use_type_clause whose scope encloses a place, the declaration of each
primitive operator of type T is potentially use-visible at this place
if its declaration is visible at this place.
by:
For each package named in a use_package_clause whose scope encloses a
place, each declaration that occurs immediately within the declarative region
of the package is potentially use-visible at this place if the declaration
is visible at this place. For each type T or T'Class named in a
use_type_clause whose scope encloses a place, the declaration of each
primitive operator of type T is potentially use-visible at this place
if its declaration is visible at this place.
8.5.1 Object Renaming Declarations
Replace paragraph 2: [AI95-00230-01; AI95-00409-01]
object_renaming_declaration ::=
defining_identifier : subtype_mark renames object_name;
by:
object_renaming_declaration ::=
defining_identifier : subtype_mark renames object_name;
| defining_identifier : access_definition renames object_name;
The access_definition shall not include a null_exclusion.
Replace paragraph 3: [AI95-00230-01; AI95-00254-01; AI95-00409-01]
The type of the object_name shall resolve to the type determined by the
subtype_mark.
by:
The type of the object_name shall resolve to the type determined by the
subtype_mark, or in the case where the type is defined by an
access_definition, to an anonymous access type which in the case
of an access-to-object type shall have the same designated type as that of the
access_definition and in the case of an access-to-subprogram type shall
have a designated profile which is type conformant with that of the
access_definition.
Replace paragraph 4: [AI95-00231-01; AI95-00254-01; AI95-00409-01]
The renamed entity shall be an object.
by:
The renamed entity shall be an object.
In the case where the type is defined by an access_definition,
the type of the renamed object and the type defined by the access_definition:
-
shall both be access-to-object types with statically matching designated
subtypes and with both or neither being access-to-constant types; or
-
shall both be access-to-subprogram types with subtype conformant
designated profiles.
Replace paragraph 5: [AI95-00363-01]
The renamed entity shall not be a subcomponent that depends on
discriminants of a variable whose nominal subtype is unconstrained, unless
this subtype is indefinite, or the variable is aliased. A slice of an array
shall not be renamed if this restriction disallows renaming of the array.
In addition to the places where Legality Rules normally apply, these rules
apply also in the private part of an instance of a generic unit. These rules
also apply for a renaming that appears in the body of a generic unit, with
the additional requirement that even if the nominal subtype of the variable is
indefinite, its type shall not be a descendant of an untagged generic
formal derived type.
by:
The renamed entity shall not be a subcomponent that depends on
discriminants of a variable whose nominal subtype is unconstrained, unless this
subtype is indefinite, or the variable is constrained by its initial value. A
slice of an array shall not be renamed if this restriction disallows
renaming of the array. In addition to the places where Legality Rules normally
apply, these rules apply also in the private part of an instance of a generic
unit. These rules also apply for a renaming that appears in the body of a
generic unit, with the additional requirement that even if the nominal subtype
of the variable is indefinite, its type shall not be a descendant of an
untagged generic formal derived type.
Replace paragraph 6: [AI95-00230-01; AI95-00409-01]
An object_renaming_declaration declares a new view of the renamed object
whose properties are identical to those of the renamed view. Thus, the
properties of the renamed object are not affected by the
renaming_declaration. In particular, its value and whether or not it is a
constant are unaffected; similarly, the constraints that apply to an object are
not affected by renaming (any constraint implied by the subtype_mark of
the object_renaming_declaration is ignored).
by:
An object_renaming_declaration declares a new view of the renamed object
whose properties are identical to those of the renamed view. Thus, the
properties of the renamed object are not affected by the
renaming_declaration. In particular, its value and whether or not it is a
constant are unaffected; similarly, the null exclusion or constraints that
apply to an object are not affected by renaming (any constraint implied by the
subtype_mark or access_definition of the
object_renaming_declaration is ignored).
8.5.3 Package Renaming Declarations
Insert after paragraph 3: [AI95-00217-06; AI95-00412-01]
The renamed entity shall be a package.
the new paragraph:
If the package_name denotes a limited
view of a package, then name that denotes the package_renaming_declaration
shall occur only within the immediate scope of the renaming or the immediate
scope of a with_clause that mentions the package or (for a nested package)
the nearest enclosing library package.
Insert after paragraph 4: [AI95-00412-01]
A package_renaming_declaration declares a new view of the renamed package.
the new paragraph:
At places where the declaration of the limited view of the renamed package is
visible, a name that denotes the package_renaming_declaration denotes
a limited view of the package (see 10.1.1).
8.5.4 Subprogram Renaming Declarations
Replace paragraph 2: [AI95-00218-03]
subprogram_renaming_declaration ::= subprogram_specification renames callable_entity_name;
by:
subprogram_renaming_declaration ::=
[overriding_indicator]
subprogram_specification renames callable_entity_name;
Insert after paragraph 5: [AI95-00228-01]
The profile of a renaming-as-body shall be subtype-conformant with that of the
renamed callable entity, and shall conform fully to that of the declaration it
completes. If the renaming-as-body completes that declaration before the
subprogram it declares is frozen, the profile shall be mode-conformant with
that of the renamed callable entity and the subprogram it declares takes its
convention from the renamed subprogram; otherwise, the profile shall be
subtype-conformant with that of the renamed callable entity and the convention
of the renamed subprogram shall not be Intrinsic. A renaming-as-body is illegal
if the declaration occurs before the subprogram whose declaration it completes
is frozen, and the renaming renames the subprogram itself, through one or more
subprogram renaming declarations, none of whose subprograms has been frozen.
the new paragraph:
If the callable_entity_name of a renaming denotes a subprogram which
shall be overridden (see 3.9.3), then the renaming is illegal.
8.6 The Context of Overload Resolution
Replace paragraph 17: [AI95-00382-01]
If a usage name appears within the declarative region of a type_declaration
and denotes that same type_declaration, then it denotes the current
instance of the type (rather than the type itself). The current instance of a
type is the object or value of the type that is associated with the execution
that evaluates the usage name.
by:
If a usage name appears within the declarative region of a type_declaration
and denotes that same type_declaration, then it denotes the current
instance of the type (rather than the type itself); the current instance of a
type is the object or value of the type that is associated with the execution
that evaluates the usage name. This rule does not apply if the usage name
appears within the subtype_mark of an access_definition for an
access-to-object type, or within the subtype of a parameter or result of an
access-to-subprogram type.
Replace paragraph 20: [AI95-00231-01]
The expected type for a given expression, name,
or other construct determines, according to the type resolution
rules given below, the types considered for the construct during
overload resolution.
The type resolution rules provide support for class-wide programming,
universal numeric literals, dispatching
operations, and anonymous access types:
by:
The expected type for a given expression, name,
or other construct determines, according to the type resolution
rules given below, the types considered for the construct during
overload resolution.
The type resolution rules provide support for class-wide programming,
universal literals, dispatching operations, and anonymous access types:
Replace paragraph 25: [AI95-00230-01; AI95-00231-01; AI95-00254-01; AI95-00409-01]
-
when T is an anonymous access type (see 3.10) with designated
type D, to an access-to-variable type whose designated type is D'Class
or is covered by D.
by:
-
when T is a specific anonymous access-to-object type (see 3.10)
with designated type D, to an access-to-object type whose designated type
is D'Class or is covered by D; or
-
when T is an anonymous access-to-subprogram type (see 3.10), to
an access-to-subprogram type whose designated profile is type-conformant
with that of T.
Replace paragraph 27: [AI95-00332-01]
When the expected type for a construct is required to be a single type in a
given class, the type expected for the construct shall be determinable solely
from the context in which the construct appears, excluding the construct
itself, but using the requirement that it be in the given class; the type of
the construct is then this single expected type. Furthermore, the context shall
not be one that expects any type in some class that contains types of the given
class; in particular, the construct shall not be the operand of a
type_conversion.
by:
When a construct is one that requires that its expected type be a single type
in a given class, the type of the construct shall be determinable solely from
the context in which the construct appears, excluding the construct itself, but
using the requirement that it be in the given class. Furthermore, the context
shall not be one that expects any type in some class that contains types of
the given class; in particular, the construct shall not be the operand of a
type_conversion.
Section 9: Tasks and Synchronization
9.1 Task Units and Task Objects
Replace paragraph 2: [AI95-00345-01]
task_type_declaration ::=
task type defining_identifier [known_discriminant_part] [is task_definition];
by:
task_type_declaration ::=
task type defining_identifier [known_discriminant_part] [is
[new interface_list with]
task_definition];
Replace paragraph 3: [AI95-00399-01]
single_task_declaration ::=
task defining_identifier [is task_definition];
by:
single_task_declaration ::=
task defining_identifier [is
[new interface_list with]
task_definition];
Delete paragraph 8: [AI95-00345-01]
A task declaration requires a completion, which shall be a task_body, and
every task_body shall be the completion of some task declaration.
Insert after paragraph 9.1: [AI95-00345-01; AI95-00397-01; AI95-00401-01]
For a task declaration without a task_definition, a task_definition
without task_items is assumed.
the new paragraphs:
For a task_type_declaration, if the first parameter of a primitive
inherited subprogram is of the task type or an access parameter designating the
task type, and there is an entry_declaration for a single entry with the
same identifier within the task_type_declaration, whose profile is type
conformant with the prefixed view profile of inherited subprogram, the
inherited subprogram is said to be implemented by the conforming task
entry.
A task declaration requires a completion, which shall be a task_body, and
every task_body shall be the completion of some task declaration.
Each interface_subtype_mark of an interface_list appearing within a
task_type_declaration shall denote a limited interface type that
is not a protected interface.
For each primitive subprogram inherited by the type declared by a
task_type_declaration, at most one of the following shall apply:
-
the inherited subprogram is overridden with a primitive
subprogram of the task type, in which case the overriding
subprogram shall be subtype conformant with the inherited
subprogram and not abstract; or
-
the inherited subprogram is implemented by a single entry of the task type;
in which case its prefixed view profile shall be subtype conformant with that
of the task entry.
If neither applies, the inherited subprogram shall be a null procedure. In
addition to the places where Legality Rules normally apply (see 12.3), these
rules also apply in the private part of an instance of a generic unit.
Replace paragraph 21: [AI95-00287-01]
4 A task type is a limited type (see 7.5), and hence has neither
an assignment operation nor predefined equality operators. If an application
needs to store and exchange task identities, it can do so by defining an access
type designating the corresponding task objects and by using access values for
identification purposes. Assignment is available for such an access type as for
any access type. Alternatively, if the implementation supports the Systems
Programming Annex, the Identity attribute can be used for task identification
(see C.7).
by:
4 A task type is a limited type (see 7.5), and hence has neither
assignment_statements nor predefined equality operators. If an application
needs to store and exchange task identities, it can do so by defining an access
type designating the corresponding task objects and by using access values for
identification purposes. Assignment is available for such an access type as for
any access type. Alternatively, if the implementation supports the Systems
Programming Annex, the Identity attribute can be used for task identification
(see C.7.1).
9.2 Task Execution - Task Activation
Replace paragraph 2: [AI95-00416-01]
A task object (which represents one task) can be created either as part of the
elaboration of an object_declaration occurring immediately within some
declarative region, or as part of the evaluation of an allocator. All
tasks created by the elaboration of object_declarations of a single
declarative region (including subcomponents of the declared objects) are
activated together. Similarly, all tasks created by the evaluation of a single
allocator are activated together. The activation of a task is associated
with the innermost allocator or object_declaration that is
responsible for its creation.
by:
A task object (which represents one task) can be a part of a
stand-alone object, of an object created by an allocator, or of an
anonymous object of a limited type. All tasks that are part of any
of the stand-alone objects created by the elaboration of
object_declarations (or generic_associations of formal objects of
mode in) of a single declarative region are activated together. All tasks
that are part of a single object that is not a stand-alone object are activated
together.
Replace paragraph 3: [AI95-00416-01]
For tasks created by the elaboration of object_declarations of a given
declarative region, the activations are initiated within the context of the
handled_sequence_of_statements (and its associated exception_handlers
if any -- see 11.2), just prior to executing the statements of the
_sequence. For a package without an explicit body or an explicit
handled_sequence_of_statements, an implicit body or an implicit
null_statement is assumed, as defined in 7.2.
by:
For the tasks of a given declarative region, the activations are initiated
within the context of the handled_sequence_of_statements (and its
associated exception_handlers if any -- see 11.2), just prior to executing
the statements of the _sequence. For a package without an explicit body or
an explicit handled_sequence_of_statements, an implicit body or an
implicit null_statement is assumed, as defined in 7.2.
Replace paragraph 4: [AI95-00416-01]
For tasks created by the evaluation of an allocator, the activations are
initiated as the last step of evaluating the allocator, after completing
any initialization for the object created by the allocator, and prior to
returning the new access value.
by:
For tasks that are part of a single object that is not a stand-alone
object, activations are initiated after completing any
initialization of the outermost object enclosing these tasks, prior
to performing any other operation on the outermost object. In
particular, for tasks that are part of the object created
by the evaluation of an allocator, the activations are initiated as
the last step of evaluating the allocator, prior
to returning the new access value. For tasks that are part of an
object that is the result of a function call, the activations are
not initiated until after the function returns.
9.3 Task Dependence - Termination of Tasks
Replace paragraph 2: [AI95-00162-01]
-
If the task is created by the evaluation of an allocator for a
given access type, it depends on each master that includes the elaboration of
the declaration of the ultimate ancestor of the given access type.
by:
-
If the task is created by the evaluation of an allocator for a
given access type, it depends on each master that includes the elaboration of
the declaration of the ultimate ancestor of the given access type other than
the declaration itself.
Replace paragraph 3: [AI95-00162-01]
-
If the task is created by the elaboration of an
object_declaration, it depends on each master that includes this
elaboration.
by:
-
If the task is created by the elaboration of an
object_declaration, it depends on each master that includes this
elaboration other than the declaration itself.
9.4 Protected Units and Protected Objects
Replace paragraph 2: [AI95-00345-01]
protected_type_declaration ::=
protected type defining_identifier [known_discriminant_part] [is protected_definition];
by:
protected_type_declaration ::=
protected type defining_identifier [known_discriminant_part] [is
[new interface_list with]
protected_definition];
Replace paragraph 3: [AI95-00399-01]
single_protected_declaration ::=
protected defining_identifier is protected_definition;
by:
single_protected_declaration ::=
protected defining_identifier is
[new interface_list with]
protected_definition;
Delete paragraph 10: [AI95-00345-01]
A protected declaration requires a completion, which shall be a
protected_body, and every protected_body shall be the completion of
some protected declaration.
Insert after paragraph 11: [AI95-00345-01; AI95-00397-01; AI95-00401-01]
A protected_definition defines a protected type and its first subtype. The
list of protected_operation_declarations of a protected_definition,
together with the known_discriminant_part, if any, is called the visible
part of the protected unit. The optional list of
protected_element_declarations after the reserved word private is
called the private part of the protected unit.
the new paragraphs:
For a protected_type_declaration, if the first parameter of a primitive
inherited subprogram is of the protected type or an access parameter
designating the protected type, and there is a
protected_operation_declaration for a protected subprogram or single entry
with the same identifier within the protected_type_declaration, whose
profile is type conformant with the prefixed view profile of the inherited
subprogram, the inherited subprogram is said to be implemented by the
conforming protected subprogram or entry.
A protected declaration requires a completion, which shall be a
protected_body, and every protected_body shall be the completion of
some protected declaration.
Each interface_subtype_mark of an interface_list appearing within a
protected_type_declaration shall denote a limited interface type that
is not a task interface.
For each primitive subprogram inherited by the type declared by a
protected_type_declaration, at most one of the following shall apply:
-
the inherited subprogram is overridden with a primitive
subprogram of the protected type, in which case the overriding
subprogram shall be subtype conformant with the inherited
subprogram and not abstract; or
-
the inherited subprogram is implemented by a protected subprogram or
single entry of the protected type, in which case its prefixed view profile
shall be subtype conformant with that of the protected subprogram or entry.
If neither applies, the inherited subprogram shall be a null procedure. In
addition to the places where Legality Rules normally apply (see 12.3), these
rules also apply in the private part of an instance of a generic unit.
If an inherited subprogram is implemented by a protected procedure or
an entry, then the first parameter of the inherited subprogram shall be
of mode out or in out, or an access-to-variable parameter.
If a protected subprogram declaration has an overriding_indicator, then:
-
if the overriding_indicator is overriding, then the
subprogram shall implement an inherited subprogram, at the point of the
declaration;
-
if the overriding_indicator is not overriding, then the
subprogram shall not implement any inherited subprogram (at any point).
Insert after paragraph 20: [AI95-00280-01]
As the first step of the finalization of a protected object, each call
remaining on any entry queue of the object is removed from its queue and
Program_Error is raised at the place of the corresponding
entry_call_statement.
the new paragraph:
Bounded (Run-Time) Errors
It is a bounded error to call an entry or subprogram of a protected object
after that object is finalized. If the error is detected, Program_Error
is raised. Otherwise, the call proceeds normally, which may leave a task queued
forever.
Replace paragraph 23: [AI95-00287-01]
15 A protected type is a limited type (see 7.5), and hence has
neither an assignment operation nor predefined equality operators.
by:
15 A protected type is a limited type (see 7.5), and hence has
neither assignment_statements nor predefined equality operators.
9.5.2 Entries and Accept Statements
Replace paragraph 2: [AI95-00397-01]
entry_declaration ::=
entry defining_identifier [(discrete_subtype_definition)] parameter_profile;
by:
entry_declaration ::=
[overriding_indicator]
entry defining_identifier [(discrete_subtype_definition)] parameter_profile;
Insert after paragraph 13: [AI95-00397-01]
An entry_declaration in a task declaration shall not contain a specification for an access parameter (see 3.10).
the new paragraphs:
If an entry_declaration has an overriding_indicator, then:
-
if the overriding_indicator is overriding, then the entry shall implement
an inherited subprogram, at the point of the declaration;
-
if the overriding_indicator is not overriding, then the operation shall not
implement any inherited subprogram (at any point).
In addition to the places where Legality Rules normally apply (see 12.3), these
rules also apply in the private part of an instance of a generic unit.
9.6 Delay Statements, Duration, and Time
Replace paragraph 11: [AI95-00351-01]
subtype Year_Number is Integer range 1901 .. 2099;
subtype Month_Number is Integer range 1 .. 12;
subtype Day_Number is Integer range 1 .. 31;
subtype Day_Duration is Duration range 0.0 .. 86_400.0;
by:
subtype Year_Number is Integer range 1901 .. 2399;
subtype Month_Number is Integer range 1 .. 12;
subtype Day_Number is Integer range 1 .. 31;
subtype Day_Duration is Duration range 0.0 .. 86_400.0;
Replace paragraph 24: [AI95-00351-01]
The functions Year, Month, Day, and Seconds return the corresponding values for
a given value of the type Time, as appropriate to an implementation-defined
timezone; the procedure Split returns all four corresponding values.
Conversely, the function Time_Of combines a year number, a month number, a day
number, and a duration, into a value of type Time. The operators "+" and "-"
for addition and subtraction of times and durations, and the relational
operators for times, have the conventional meaning.
by:
The functions Year, Month, Day, and Seconds return the corresponding values for
a given value of the type Time, as appropriate to an implementation-defined
time zone; the procedure Split returns all four corresponding values.
Conversely, the function Time_Of combines a year number, a month number, a day
number, and a duration, into a value of type Time. The operators "+" and "-"
for addition and subtraction of times and durations, and the relational
operators for times, have the conventional meaning.
9.6.1 Formatting, Time Zones, and other operations for Time
Insert new clause: [AI95-00351-01]
The following language-defined library packages exist:
package Ada.Calendar.Time_Zones is
-- Time zone manipulation:
type Time_Offset is range -1440 .. 1440;
Unknown_Zone_Error : exception;
function UTC_Time_Offset (Date : Time := Clock) return Time_Offset;
end Ada.Calendar.Time_Zones;
package Ada.Calendar.Arithmetic is
-- Arithmetic on days:
type Day_Count is range
-366*(1+Year_Number'Last - Year_Number'First)
..
366*(1+Year_Number'Last - Year_Number'First);
subtype Leap_Seconds_Count is Integer range -999 .. 999;
procedure Difference (Left, Right : in Time;
Days : out Day_Count;
Seconds : out Duration;
Leap_Seconds : out Leap_Seconds_Count);
function "+" (Left : Time; Right : Day_Count) return Time;
function "+" (Left : Day_Count; Right : Time) return Time;
function "-" (Left : Time; Right : Day_Count) return Time;
function "-" (Left, Right : Time) return Day_Count;
end Ada.Calendar.Arithmetic;
with Ada.Calendar.Time_Zones;
package Ada.Calendar.Formatting is
-- Day of the week:
type Day_Name is (Monday, Tuesday, Wednesday, Thursday,
Friday, Saturday, Sunday);
function Day_of_Week (Date : Time) return Day_Name;
-- Hours:Minutes:Seconds access:
subtype Hour_Number is Natural range 0 .. 23;
subtype Minute_Number is Natural range 0 .. 59;
subtype Second_Number is Natural range 0 .. 59;
subtype Second_Duration is Day_Duration range 0.0 .. 1.0;
function Hour (Date : Time;
Time_Zone : Time_Zones.Time_Offset := 0)
return Hour_Number;
function Minute (Date : Time;
Time_Zone : Time_Zones.Time_Offset := 0)
return Minute_Number;
function Second (Date : Time;
Time_Zone : Time_Zones.Time_Offset := 0)
return Second_Number;
function Sub_Second (Date : Time;
Time_Zone : Time_Zones.Time_Offset := 0)
return Second_Duration;
function Seconds_Of (Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number := 0;
Sub_Second : Second_Duration := 0.0)
return Day_Duration;
procedure Split (Seconds : in Day_Duration;
Hour : out Hour_Number;
Minute : out Minute_Number;
Second : out Second_Number;
Sub_Second : out Second_Duration);
procedure Split (Date : in Time;
Time_Zone : in Time_Zones.Time_Offset := 0;
Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Hour : out Hour_Number;
Minute : out Minute_Number;
Second : out Second_Number;
Sub_Second : out Second_Duration);
function Time_Of (Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number;
Sub_Second : Second_Duration := 0.0;
Leap_Second: Boolean := False;
Time_Zone : Time_Zones.Time_Offset := 0)
return Time;
function Time_Of (Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Seconds : Day_Duration;
Leap_Second: Boolean := False;
Time_Zone : Time_Zones.Time_Offset := 0)
return Time;
procedure Split (Date : in Time;
Time_Zone : in Time_Zones.Time_Offset := 0;
Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Hour : out Hour_Number;
Minute : out Minute_Number;
Second : out Second_Number;
Sub_Second : out Second_Duration;
Leap_Second: out Boolean);
procedure Split (Date : in Time;
Time_Zone : in Time_Zones.Time_Offset := 0;
Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Seconds : out Day_Duration;
Leap_Second: out Boolean);
-- Simple image and value:
function Image (Date : Time;
Include_Time_Fraction : Boolean := False;
Time_Zone : Time_Zones.Time_Offset := 0) return String;
function Value (Date : String;
Time_Zone : Time_Zones.Time_Offset := 0) return Time;
function Image (Elapsed_Time : Duration;
Include_Time_Fraction : Boolean := False) return String;
function Value (Elapsed_Time : String) return Duration;
end Ada.Calendar.Formatting;
Type Time_Offset represents the number of minutes difference between the
implementation-defined time zone used by Ada.Calendar and another time zone.
function UTC_Time_Offset (Date : Time := Clock) return Time_Offset;
Returns, as a number of minutes, the difference between the
implementation-defined time zone of Calendar, and UTC time,
at the time Date. If the time zone of the Calendar implementation is
unknown, then Unknown_Zone_Error is raised.
procedure Difference (Left, Right : in Time;
Days : out Day_Count;
Seconds : out Duration;
Leap_Seconds : out Leap_Seconds_Count);
Returns the difference between Left and Right.
Days is the number of days of difference, Seconds is the
remainder seconds of difference, and Leap_Seconds is the number of leap
seconds. If Left < Right, then Seconds <= 0.0, Days <= 0, and Leap_Seconds <=
0. Otherwise, all values are non-negative. For the returned values, if Days =
0, then Seconds + Duration(Leap_Seconds) = Calendar."-" (Left, Right).
function "+" (Left : Time; Right : Day_Count) return Time;
function "+" (Left : Day_Count; Right : Time) return Time;
Adds a number of days to a time value. Time_Error is raised
if the result is not representable as a value of type Time.
function "-" (Left : Time; Right : Day_Count) return Time;
Subtracts a number of days from a time value. Time_Error is raised
if the result is not representable as a value of type Time.
function "-" (Left, Right : Time) return Day_Count;
Subtracts two time values, and returns the number of days between
them. This is the same value that Difference would return in Days.
function Day_of_Week (Date : Time) return Day_Name;
Returns the day of the week for Time. This is based on the Year,
Month, and Day values of Time.
function Hour (Date : Time;
Time_Zone : Time_Zones.Time_Offset := 0)
return Hour_Number;
Returns the hour for Date, as appropriate for the specified time zone
offset.
function Minute (Date : Time;
Time_Zone : Time_Zones.Time_Offset := 0)
return Minute_Number;
Returns the minute within the hour for Date, as appropriate for the
specified time zone offset.
function Second (Date : Time;
Time_Zone : Time_Zones.Time_Offset := 0)
return Second_Number;
Returns the second within the hour and minute for Date, as appropriate
for the specified time zone offset.
function Sub_Second (Date : Time;
Time_Zone : Time_Zones.Time_Offset := 0)
return Second_Duration;
Returns the fraction of second for Date (this has the same accuracy
as Day_Duration), as appropriate for the specified time zone offset.
function Seconds_Of (Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number := 0;
Sub_Second : Second_Duration := 0.0)
return Day_Duration;
Returns a Day_Duration value for the Hour:Minute:Second.Sub_Second.
This value can be used in Calendar.Time_Of as well as the argument to
Calendar."+" and Calendar."-".
procedure Split (Seconds : in Day_Duration;
Hour : out Hour_Number;
Minute : out Minute_Number;
Second : out Second_Number;
Sub_Second : out Second_Duration);
Splits Seconds into Hour:Minute:Second.Sub_Second.
procedure Split (Date : in Time;
Time_Zone : in Time_Zones.Time_Offset := 0;
Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Hour : out Hour_Number;
Minute : out Minute_Number;
Second : out Second_Number;
Sub_Second : out Second_Duration);
Splits Date into its constituent parts (Year, Month, Day, Hour, Minute,
Second, Sub_Second), relative to the specified time zone offset.
function Time_Of (Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number;
Sub_Second : Second_Duration := 0.0;
Leap_Second: Boolean := False;
Time_Zone : Time_Zones.Time_Offset := 0)
return Time;
Returns a Time built from the date and time values, relative to the
specified time zone offset. Time_Error is raised if Leap_Second is True,
and Hour, Minute, and Second are not appropriate for a Leap_Second.
function Time_Of (Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Seconds : Day_Duration;
Leap_Second: Boolean := False;
Time_Zone : Time_Zones.Time_Offset := 0)
return Time;
Returns a Time built from the date and time values, relative to the
specified time zone offset. Time_Error is raised if Leap_Second is True,
and Seconds is not appropriate for a Leap_Second.
procedure Split (Date : in Time;
Time_Zone : in Time_Zones.Time_Offset := 0;
Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Hour : out Hour_Number;
Minute : out Minute_Number;
Second : out Second_Number;
Sub_Second : out Second_Duration;
Leap_Second: out Boolean);
Split Date into its constituent parts (Year, Month, Day, Hour, Minute,
Second, Sub_Second), relative to the specified time zone offset.
Leap_Second is True if Date identifies a leap second.
procedure Split (Date : in Time;
Time_Zone : in Time_Zones.Time_Offset := 0;
Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Seconds : out Day_Duration;
Leap_Second: out Boolean);
Split Date into its constituent parts (Year, Month, Day, Seconds),
relative to the specified time zone offset. Leap_Second is True if Date
identifies a leap second.
function Image (Date : Time;
Include_Time_Fraction : Boolean := False;
Time_Zone : Time_Zones.Time_Offset := 0) return String;
Returns a string form of the Date relative to the given Time_Zone.
The format is "Year-Month-Day Hour:Minute:Second", where each value
other than Year is a 2-digit form of the value of the functions
defined in Calendar and Calendar.Formatting, including a leading '0',
if needed. Year is a 4-digit value.
If Include_Time_Fraction is True, Sub_Seconds*100 is suffixed to the
string as a 2-digit value following a '.'.
function Value (Date : String)
Time_Zone : Time_Zones.Time_Offset := 0) return Time;
Returns a Time value for the image given as Date, relative to the
given time zone. Constraint_Error is raised if the string is not formatted as
described for Image, or the function cannot interpret the given string as a
Time value.
function Image (Elapsed_Time : Duration;
Include_Time_Fraction : Boolean := False) return String;
Returns a string form of the Elapsed_Time.
The format is "Hour:Minute:Second", where each value
is a 2-digit form of the value, including a leading '0', if needed.
If Include_Time_Fraction is True, Sub_Seconds*100 is suffixed to the
string as a 2-digit value following a '.'.
If Elapsed_Time < 0.0, the result is Image (abs Elapsed_Time,
Include_Time_Fraction) prefixed with "-". If abs Elapsed_Time represents
100 hours or more, the result is implementation-defined.
function Value (Elapsed_Time : String) return Duration;
Returns a Duration value for the image given as Elapsed_Time.
Constraint_Error is raised if the string is not formatted as described for
Image, or the function cannot interpret the given string as a Duration
value.
An implementation should support leap seconds if the target system supports
them. If leap seconds are not supported, Difference should return zero for
Leap_Seconds, Split should return False for Leap_Second, and Time_Of should
raise Time_Error if Leap_Second is True.
NOTES
36 The time in the time zone known as Greenwich Mean Time (GMT)
is generally equivalent to UTC time.
37 The implementation-defined time zone of package Calendar
may, but need not, be the local time zone. UTC_Time_Offset always returns the
difference relative to the implementation-defined time zone of package
Calendar. If UTC_Time_Offset does not raise Unknown_Zone_Error, UTC time
can be safely calculated (within the accuracy of the underlying time-base).
38 Calling Split on the results of subtracting Duration(UTC_Time_Offset*60)
from Clock provides the components (hours, minutes, and so on) of the UTC
time. In the United States, for example, UTC_Time_Offset will generally be
negative.
9.7.2 Timed Entry Calls
Replace paragraph 1: [AI95-00345-01]
A timed_entry_call issues an entry call that is cancelled if the call (or
a requeue-with-abort of the call) is not selected before the expiration time
is reached.
by:
A timed_entry_call issues an entry call that is cancelled if the call (or
a requeue-with-abort of the call) is not selected before the expiration time
is reached. A procedure call may appear rather than an entry call for cases
where the procedure might be implemented by an entry.
Replace paragraph 3: [AI95-00345-01]
entry_call_alternative ::=
entry_call_statement [sequence_of_statements]
by:
entry_call_alternative ::=
procedure_or_entry_call [sequence_of_statements]
procedure_or_entry_call ::=
procedure_call_statement | entry_call_statement
If a procedure_call_statement is used for a procedure_or_entry_call,
the procedure_name or procedure_prefix of the
procedure_call_statement shall denote an entry renamed as a procedure, a
formal subprogram, or (a view of) a primitive subprogram of a limited interface
whose first parameter is a controlling parameter (see 3.9.2).
If a procedure_call_statement is used for a procedure_or_entry_call,
and the procedure is implemented by an entry, then the procedure_name,
or procedure_prefix and possibly the first parameter of
the procedure_call_statement, determine the target object of the call
and the entry to be called.
Replace paragraph 4: [AI95-00345-01]
For the execution of a timed_entry_call, the entry_name and the
actual parameters are evaluated, as for a simple entry call (see 9.5.3). The
expiration time (see 9.6) for the call is determined by evaluating the
delay_expression of the delay_alternative; the entry call is then
issued.
by:
For the execution of a timed_entry_call, the entry_name,
procedure_name, or procedure_prefix, and any actual
parameters are evaluated, as for a simple entry call (see 9.5.3) or procedure
call (see 6.4). The expiration time (see 9.6) for the call is determined by
evaluating the delay_expression of the delay_alternative. If the
call is an entry call or a call on a procedure implemented by an entry, the
entry call is then issued. Otherwise, the call proceeds as described in 6.4 for
a procedure call, followed by the sequence_of_statements of the
entry_call_alternative, and the delay_alternative
sequence_of_statements is ignored.
9.7.4 Asynchronous Transfer of Control
Replace paragraph 4: [AI95-00345-01]
triggering_statement ::= entry_call_statement | delay_statement
by:
triggering_statement ::= procedure_or_entry_call | delay_statement
Replace paragraph 6: [AI95-00345-01]
For the execution of an asynchronous_select whose triggering_statement
is an entry_call_statement, the entry_name and actual parameters
are evaluated as for a simple entry call (see 9.5.3), and the entry call is
issued. If the entry call is queued (or requeued-with-abort), then the
abortable_part is executed. If the entry call is selected immediately,
and never requeued-with-abort, then the abortable_part is never started.
by:
For the execution of an asynchronous_select whose
triggering_statement is a procedure_or_entry_call, the
entry_name, procedure_name, or procedure_prefix,
and actual parameters are evaluated as for a simple entry
call (see 9.5.3) or procedure call (see 6.4). If the call is an entry call or a
call on a procedure implemented by an entry, the entry call is issued. If the
entry call is queued (or requeued-with-abort), then the abortable_part is
executed. If the entry call is selected immediately, and never
requeued-with-abort, then the abortable_part is never started. If the call
is on a procedure that is not implemented by an entry, the call proceeds as
described in 6.4, followed by the sequence_of_statements of the
triggering_alternative, and the abortable_part is never started.
9.8 Abort of a Task - Abort of a Sequence of Statements
Replace paragraph 3: [AI95-00345-01]
Each task_name is expected to be of any task type; they need not all
be of the same task type.
by:
Each task_name is expected to be of any task type or task interface
type; they need not all be of the same type.
9.9 Task and Entry Attributes
Replace paragraph 1: [AI95-00345-01]
For a prefix T that is of a task type (after any implicit dereference),
the following attributes are defined:
by:
For a prefix T that is of a task type or task interface type (after any
implicit dereference), the following attributes are defined:
Section 10: Program Structure and Compilation Issues
10.1.1 Compilation Units - Library Units
Insert after paragraph 12: [AI95-00217-06; AI95-00326-01]
A library_unit_declaration or a library_unit_renaming_declaration is
private if the declaration is immediately preceded by the reserved word
private; it is otherwise public. A library unit is private or public
according to its declaration. The public descendants of a library unit are
the library unit itself, and the public descendants of its public children. Its
other descendants are private descendants.
the new paragraphs:
For each library package_declaration in the environment, there is
an implicit declaration of a limited view of that library package. The
limited view of a package contains:
-
For each nested package_declaration, a declaration of the
limited view of that package, with the same defining_program_unit_name.
-
For each type_declaration in the visible part, an incomplete
view of the type is declared. If the type_declaration is tagged, then the
view is a tagged incomplete view.
The limited view of a library package_declaration is private if that
library package_declaration is immediately preceded by the reserved word
private.
There is no syntax for declaring limited views of packages, because they are
always implicit. The implicit declaration of a limited view of a package is
not the declaration of a library unit (the library package_declaration is);
nonetheless, it is a library_item.
A library package_declaration is the completion of the declaration of
its limited view.
Replace paragraph 19: [AI95-00331-01]
For each declaration or renaming of a generic unit as a child of some
parent generic package, there is a corresponding declaration nested
immediately within each instance of the parent. This declaration is visible
only within the scope of a with_clause that mentions the child generic
unit.
by:
For each child C of some parent generic package P, there is a
corresponding declaration C nested immediately within each instance
of P. For the purposes of this rule, if a child C itself has a
child D, each corresponding declaration for C has a corresponding
child D. The corresponding declaration for a child within an instance is
visible only within the scope of a with_clause that mentions the
(original) child generic unit.
Replace paragraph 26: [AI95-00217-06]
A library_item depends semantically upon its parent declaration. A subunit
depends semantically upon its parent body. A library_unit_body depends
semantically upon the corresponding library_unit_declaration, if any. A
compilation unit depends semantically upon each library_item mentioned in
a with_clause of the compilation unit. In addition, if a given compilation unit
contains an attribute_reference of a type defined in another compilation unit,
then the given compilation unit depends semantically upon the other compilation
unit. The semantic dependence relationship is transitive.
by:
A library_item depends semantically upon its parent declaration. A subunit
depends semantically upon its parent body. A library_unit_body depends
semantically upon the corresponding library_unit_declaration, if any.
The implicit declaration of the limited view of a library package depends
semantically upon the implicit declaration of the limited view of its parent.
The declaration of a library package depends semantically upon the implicit
declaration of its limited view. A
compilation unit depends semantically upon each library_item mentioned in
a with_clause of the compilation unit. In addition, if a given compilation unit
contains an attribute_reference of a type defined in another compilation unit,
then the given compilation unit depends semantically upon the other compilation
unit. The semantic dependence relationship is transitive.
The elaboration of the limited view of a package has no effect.
10.1.2 Context Clauses - With Clauses
Replace paragraph 4: [AI95-00217-06; AI95-00326-01]
with_clause ::= with library_unit_name {, library_unit_name};
by:
with_clause ::= limited_with_clause | nonlimited_with_clause
limited_with_clause ::= limited [private] with library_unit_name {, library_unit_name};
nonlimited_with_clause ::= [private] with library_unit_name {, library_unit_name};
Replace paragraph 6: [AI95-00217-06]
A library_item is mentioned in a with_clause if it is denoted by
a library_unit_name or a prefix in the with_clause.
by:
A library_item is named in a with_clause if it is denoted by a
library_unit_name in the with_clause. A library_item is
mentioned in a with_clause if it is named in the
with_clause or if it is denoted by a prefix in the with_clause.
Replace paragraph 8: [AI95-00217-06; AI95-00220-01; AI95-00262-01; AI95-00412-01]
If a with_clause of a given compilation_unit mentions a private
child of some library unit, then the given compilation_unit shall be either
the declaration of a private descendant of that library unit or the body
or a subunit of a (public or private) descendant of that library unit.
by:
If a with_clause of a given compilation_unit mentions a private child
of some library unit, then the given compilation_unit shall be one of:
-
the declaration, body, or subunit of a private descendant of that
library unit;
-
the body or subunit of a public descendant of that library unit,
but not a subprogram body acting as a subprogram declaration (see 10.1.4); or
-
the declaration of a public descendant of that library unit, and
the with_clause shall include the reserved word private.
A name denoting a library item that is visible only due to being
mentioned in with_clauses that include the reserved word private
shall appear only within
-
a body, but not within the subprogram_specification of a library subprogram body,
-
a private descendant of the unit on which one of these
with_clauses appear, or
-
a pragma within a context clause.
A library_item mentioned in a limited_with_clause shall be a
package_declaration[, not a subprogram_declaration,
generic_declaration, generic_instantiation, or
package_renaming_declaration].
A limited_with_clause shall not appear on a library_unit_body,
subunit, or library_unit_renaming_declaration.
A limited_with_clause which names a library_item shall not appear:
-
in the same context_clause as a nonlimited_with_clause which
mentions the same library_item; or
-
in the same context_clause as a use_clause which names an
entity declared within the declarative region of the library_item; or
-
in the scope of a nonlimited_with_clause which mentions the same
library_item; or
-
in the scope of a use_clause which names an entity declared
within the declarative region of the library_item.
10.1.3 Subunits of Compilation Units
Replace paragraph 3: [AI95-00218-03]
subprogram_body_stub ::= subprogram_specification is separate;
by:
subprogram_body_stub ::=
[overriding_indicator]
subprogram_specification is separate;
Replace paragraph 8: [AI95-00243-01]
The parent body of a subunit is the body of the program unit denoted by
its parent_unit_name. The term subunit is used to refer to a
subunit and also to the proper_body of a subunit.
by:
The parent body of a subunit is the body of the program unit denoted by
its parent_unit_name. The term subunit is used to refer to a
subunit and also to the proper_body of a subunit. A subunit
of a program unit includes subunits declared directly in the program unit as
well as any subunits declared in those subunits (recursively).
10.1.4 The Compilation Process
Replace paragraph 3: [AI95-00217-06]
The mechanisms for creating an environment and for adding and replacing
compilation units within an environment are implementation defined.
by:
The mechanisms for creating an environment and for adding and replacing
compilation units within an environment are implementation defined. The
mechanisms for adding a unit mentioned in a limited_with_clause to an
environment are implementation defined.
Replace paragraph 6: [AI95-00217-06]
The implementation may require that a compilation unit be legal before
inserting it into the environment.
by:
The implementation may require that a compilation unit be legal before it can
be mentioned in a limited_with_clause or it can be inserted
into the environment.
Replace paragraph 7: [AI95-00214-01]
When a compilation unit that declares or renames a library unit is added to the
environment, the implementation may remove from the environment any preexisting
library_item with the same defining_program_unit_name. When a compilation unit
that is a subunit or the body of a library unit is added to the environment,
the implementation may remove from the environment any preexisting version of
the same compilation unit. When a given compilation unit is removed from the
environment, the implementation may also remove any compilation unit that
depends semantically upon the given one. If the given compilation unit contains
the body of a subprogram to which a pragma Inline applies, the
implementation may also remove any compilation unit containing a call to that
subprogram.
by:
When a compilation unit that declares or renames a library unit is added to the
environment, the implementation may remove from the environment any preexisting
library_item or subunit with the same full expanded name. When a
compilation unit that is a subunit or the body of a library unit is added to
the environment, the implementation may remove from the environment any
preexisting version of the same compilation unit. When a compilation unit that
contains a body_stub is added to the environment, the implementation may
remove any preexisting library_item or subunit with the same full
expanded name as the body_stub. When a given compilation unit is removed
from the environment, the implementation may also remove any compilation unit
that depends semantically upon the given one. If the given compilation unit
contains the body of a subprogram to which a pragma Inline applies, the
implementation may also remove any compilation unit containing a call to that
subprogram.
10.1.5 Pragmas and Program Units
Replace paragraph 9: [AI95-00212-01]
An implementation may place restrictions on configuration pragmas, so
long as it allows them when the environment contains no library_items
other than those of the predefined environment.
by:
An implementation may require that configuration pragmas that select
partition-wide or system-wide options be compiled when the environment
contains no library_items other than those of the predefined environment.
In this case, the implementation shall still accept configuration pragmas
in individual compilations that confirm the initially selected
partition-wide or system-wide options.
10.1.6 Environment-Level Visibility Rules
Replace paragraph 2: [AI95-00312-01]
Within the parent_unit_name at the beginning of a
library_item, and within a with_clause, the only declarations that
are visible are those that are library_items of the environment, and the
only declarations that are directly visible are those that are root
library_items of the environment. {notwithstanding} Notwithstanding the
rules of 4.1.3, an expanded name in a with_clause may consist of a
prefix that denotes a generic package and a selector_name that
denotes a child of that generic package. [(The child is necessarily a generic
unit; see 10.1.1.)]
by:
Within the parent_unit_name at the beginning of a
library_item, and within a with_clause, the only declarations that
are visible are those that are library_items of the environment, and the
only declarations that are directly visible are those that are root
library_items of the environment.
Insert after paragraph 5: [AI95-00312-01]
Within a pragma that appears at the place of a compilation unit, the
immediately preceding library_item and each of its ancestors is visible.
The ancestor root library_item is directly visible.
the new paragraph:
Notwithstanding the rules of 4.1.3, an expanded name in a with_clause, a
pragma in a context_clause, or a pragma that appears at the
place of a compilation unit} may consist of a prefix that denotes a
generic package and a selector_name that denotes a child of that generic
package. (The child is necessarily a generic unit; see 10.1.1.)
10.2 Program Execution
Replace paragraph 6: [AI95-00217-06]
-
If a compilation unit with stubs is needed, then so are any
corresponding subunits.
by:
-
If a compilation unit with stubs is needed, then so are any
corresponding subunits;
-
If the limited view of a unit is needed, then the full view of the
unit is needed.
Replace paragraph 9: [AI95-00256-01]
The order of elaboration of library units is determined primarily by the
elaboration dependences. There is an elaboration dependence of a given
library_item upon another if the given library_item or any of its
subunits depends semantically on the other library_item. In addition, if a
given library_item or any of its subunits has a pragma Elaborate or
Elaborate_All that mentions another library unit, then there is an elaboration
dependence of the given library_item upon the body of the other library
unit, and, for Elaborate_All only, upon each library_item needed by the
declaration of the other library unit.
by:
The order of elaboration of library units is determined primarily by the
elaboration dependences. There is an elaboration dependence of a given
library_item upon another if the given library_item or any of its
subunits depends semantically on the other library_item. In addition, if a
given library_item or any of its subunits has a pragma Elaborate or
Elaborate_All that names another library unit, then there is an elaboration
dependence of the given library_item upon the body of the other library
unit, and, for Elaborate_All only, upon each library_item needed by the
declaration of the other library unit.
10.2.1 Elaboration Control
Insert after paragraph 4: [AI95-00161-01]
A pragma Preelaborate is a library unit pragma.
the new paragraphs:
The form of pragma Preelaborable_Initialization is as follows:
pragma Preelaborable_Initialization (direct_name);
Replace paragraph 9: [AI95-00161-01]
-
The creation of a default-initialized object (including a component) of
a descendant of a private type, private extension, controlled type, task type,
or protected type with entry_declarations; similarly the evaluation of an
extension_aggregate with an ancestor subtype_mark denoting a subtype
of such a type.
by:
-
The creation of an object (including a component) of a type which does
not have preelaborable initialization. Similarly the evaluation of an
extension_aggregate with an ancestor subtype_mark denoting a subtype
of such a type.
Replace paragraph 10: [AI95-00403-01]
A generic body is preelaborable only if elaboration of a corresponding instance
body would not perform any such actions, presuming that the actual for each
formal private type (or extension) is a private type (or extension), and the
actual for each formal subprogram is a user-defined subprogram.
by:
A generic body is preelaborable only if elaboration of a corresponding instance
body would not perform any such actions, presuming that:
-
the actual for each formal private type (or extension) declared within
the formal part of the generic unit is a private type (or extension) that does
not have preelaborable initialization;
-
the actual for each formal type is nonstatic;
-
the actual for each formal object is nonstatic; and
-
the actual for each formal subprogram is a user-defined subprogram.
Insert after paragraph 11: [AI95-00161-01]
If a pragma Preelaborate (or pragma Pure -- see below) applies to a
library unit, then it is preelaborated. If a library unit is preelaborated,
then its declaration, if any, and body, if any, are elaborated prior to all
non-preelaborated library_items of the partition. The declaration and body
of a preelaborated library unit, and all subunits that are elaborated as part
of elaborating the library unit, shall be preelaborable. In addition to the
places where Legality Rules normally apply (see 12.3), this rule applies also
in the private part of an instance of a generic unit. In addition, all
compilation units of a preelaborated library unit shall depend semantically
only on compilation units of other preelaborated library units.
the new paragraphs:
The following rules specify which entities have preelaborable initialization:
-
The partial view of a private type or private extension, a protected
type without entry_declarations, a generic formal private type, or a
generic formal derived type, have preelaborable initialization if and only if
the pragma Preelaborable_Initialization has been applied to them.
-
A component (including a discriminant) of a record or protected type
has preelaborable initialization if its declaration includes a
default_expression whose execution does not perform any actions prohibited
in preelaborable constructs as described above, or if its declaration does not
include a default expression and its type has preelaborable initialization.
-
A derived type has preelaborable initialization if its parent type has
preelaborable initialization and (in the case of a derived record or protected
type) if the non-inherited components all have preelaborable initialization.
Moreover, a user-defined controlled type with an overridding
Initialize procedure does not have preelaborable initialization.
-
A view of a type has preelaborable initialization if it is an
elementary type, an array type whose component type has preelaborable
initialization, or a record type whose components all have preelaborable
initialization.
A pragma Preelaborable_Initialization specifies that a type has
preelaborable initialization. This pragma shall appear in the visible part
of a package or generic package.
If the pragma appears in the first list of declarative_items of a
package_specification, then the direct_name shall denote the first
subtype of a private type, private extension, or protected type without
entry_declarations, and the type shall be declared within the same package
as the pragma. If the pragma is applied to a private type or a
private extension, the full view of the type shall have preelaborable
initialization. If the pragma is applied to a protected type, each
component of the protected type shall have preelaborable initialization. In
addition to the places where Legality Rules normally apply, these rules apply
also in the private part of an instance of a generic unit.
If the pragma appears in a generic_formal_part, then the
direct_name shall denote a generic formal private type or a generic formal
derived type declared in the same generic_formal_part as the pragma.
In a generic_instantiation the corresponding actual type shall have
preelaborable initialization.
Replace paragraph 16: [AI95-00366-01]
A pure library_item is a preelaborable library_item that does not
contain the declaration of any variable or named access type, except within a
subprogram, generic subprogram, task unit, or protected unit.
by:
A pure library_item is a preelaborable library_item that does not
contain the declaration of any variable, or named access-to-object
type for which the Storage_Size has not been specified by a static
expression with value zero (0) and is not defined to be zero (0),
excepting declarations within a subprogram, generic subprogram, generic
formal part, task unit, or protected unit.
Replace paragraph 17: [AI95-00366-01]
A pragma Pure is used to declare that a library unit is pure. If a
pragma Pure applies to a library unit, then its compilation units shall
be pure, and they shall depend semantically only on compilation units of other
library units that are declared pure.
by:
A pragma Pure is used to declare that a library unit is pure. If a
pragma Pure applies to a library unit, then its compilation units shall
be pure, and they shall depend semantically only on compilation units of other
library units that are declared pure. Furthermore, the full view of any
private type declared in the visible part of the library unit shall support
external streaming (see 13.13.2).
Replace paragraph 18: [AI95-00366-01]
If a library unit is declared pure, then the implementation is permitted to
omit a call on a library-level subprogram of the library unit if the results
are not needed after the call. Similarly, it may omit such a call and simply
reuse the results produced by an earlier call on the same subprogram, provided
that none of the parameters are of a limited type, and the addresses and values
of all by-reference actual parameters, and the values of all by-copy-in actual
parameters, are the same as they were at the earlier call. This permission
applies even if the subprogram produces other side effects when called.
by:
If a library unit is declared pure, then the implementation is permitted to
omit a call on a library-level subprogram of the library unit if the results
are not needed after the call. In addition, the implementation may omit a call
on such a subprogram and simply reuse the results produced by an earlier call
on the same subprogram, provided that none of the parameters nor any object
accessible via access values from the parameters are of a limited type, and the
addresses and values of all by-reference actual parameters, the values of all
by-copy-in actual parameters, and the values of all objects accessible via
access values from the parameters, are the same as they were at the earlier
call. This permission applies even if the subprogram produces other side
effects when called.
Section 11: Exceptions
11.3 Raise Statements
Replace paragraph 2: [AI95-00361-01]
raise_statement ::= raise [exception_name];
by:
raise_statement ::= raise; |
raise exception_name [with string_expression];
Insert after paragraph 3: [AI95-00361-01]
The name, if any, in a raise_statement shall denote an exception.
A raise_statement with no exception_name (that is, a re-raise
statement) shall be within a handler, but not within a body enclosed by that
handler.
the new paragraph:
The expression, if any, in a raise_statement, is expected
to be of type String.
Replace paragraph 4: [AI95-00361-01]
To raise an exception is to raise a new occurrence of that exception, as
explained in 11.4. For the execution of a raise_statement with an
exception_name, the named exception is raised. For the execution of
a re-raise statement, the exception occurrence that caused transfer of control
to the innermost enclosing handler is raised again.
by:
To raise an exception is to raise a new occurrence of that exception, as
explained in 11.4. For the execution of a raise_statement with an
exception_name, the named exception is raised. If a
string_expression is present, a call of
Ada.Exceptions.Exception_Message returns that string. For the execution of a
re-raise statement, the exception occurrence that caused transfer of control to
the innermost enclosing handler is raised again.
11.4.1 The Package Exceptions
Replace paragraph 2: [AI95-00362-01; AI95-00400-01]
package Ada.Exceptions is
type Exception_Id is private;
Null_Id : constant Exception_Id;
function Exception_Name(Id : Exception_Id) return String;
by:
package Ada.Exceptions is
pragma Preelaborate(Exceptions);
type Exception_Id is private;
pragma Preelaborable_Initialization (Exception_Id);
Null_Id : constant Exception_Id;
function Exception_Name(Id : Exception_Id) return String;
function Wide_Exception_Name(Id : Exception_Id) return Wide_String;
function Wide_Wide_Exception_Name(Id : Exception_Id) return Wide_Wide_String;
Replace paragraph 3: [AI95-00362-01]
type Exception_Occurrence is limited private;
type Exception_Occurrence_Access is access all Exception_Occurrence;
Null_Occurrence : constant Exception_Occurrence;
by:
type Exception_Occurrence is limited private;
pragma Preelaborable_Initialization (Exception_Occurrence);
type Exception_Occurrence_Access is access all Exception_Occurrence;
Null_Occurrence : constant Exception_Occurrence;
Replace paragraph 4: [AI95-00329-01]
procedure Raise_Exception(E : in Exception_Id;
Message : in String := "");
function Exception_Message(X : Exception_Occurrence) return String;
procedure Reraise_Occurrence(X : in Exception_Occurrence);
by:
procedure Raise_Exception(E : in Exception_Id;
Message : in String := "");
pragma No_Return(Raise_Exception);
function Exception_Message(X : Exception_Occurrence) return String;
procedure Reraise_Occurrence(X : in Exception_Occurrence);
Replace paragraph 5: [AI95-00400-01]
function Exception_Identity(X : Exception_Occurrence)
return Exception_Id;
function Exception_Name(X : Exception_Occurrence) return String;
-- Same as Exception_Name(Exception_Identity(X)).
function Exception_Information(X : Exception_Occurrence) return String;
by:
function Exception_Identity(X : Exception_Occurrence)
return Exception_Id;
function Exception_Name(X : Exception_Occurrence) return String;
-- Same as Exception_Name(Exception_Identity(X)).
function Wide_Exception_Name(X : Exception_Occurrence)
return Wide_String;
-- Same as Wide_Exception_Name(Exception_Identity(X)).
function Wide_Wide_Exception_Name(X : Exception_Occurrence)
return Wide_Wide_String;
-- Same as Wide_Wide_Exception_Name(Exception_Identity(X)).
function Exception_Information(X : Exception_Occurrence) return String;
Replace paragraph 10: [AI95-00361-01; AI95-00378-01]
Raise_Exception raises a new occurrence of the identified exception. In this
case, Exception_Message returns the Message parameter of Raise_Exception. For
a raise_statement with an exception_name, Exception_Message
returns implementation-defined information about the exception occurrence.
Reraise_Occurrence reraises the specified exception occurrence.
by:
Raise_Exception raises a new occurrence of the identified exception. In this
case, Exception_Message returns the Message parameter of Raise_Exception.
For a raise_statement with an exception_name and a
string_expression, Exception_Message returns that string. For a
raise_statement with an exception_name but without a
string_expression, Exception_Message returns
implementation-defined information about the exception occurrence.
In all cases, Exception_Message returns a string with lower bound 1.
Reraise_Occurrence reraises the specified exception occurrence.
Replace paragraph 12: [AI95-00378-01; AI95-00400-01; AI95-00417-01]
The Exception_Name functions return the full expanded name of the exception, in
upper case, starting with a root library unit. For an exception declared
immediately within package Standard, the defining_identifier is returned.
The result is implementation defined if the exception is declared within an
unnamed block_statement.
by:
The functions Wide_Wide_Exception_Name return the full expanded name of the
exception, in upper case, starting with a root library unit. For an exception
declared immediately within package Standard, the defining_identifier is
returned. The result is implementation defined if the exception is declared
within an unnamed block_statement.
The functions Exception_Name (respectively, Wide_Exception_Name) return the
same sequence of graphic characters as that defined for
Wide_Wide_Exception_Name, if all the graphic characters are defined in
Character (respectively, Wide_Character); otherwise, the sequence of characters
is implementation defined, but no shorter than that returned by
Wide_Wide_Exception_Name for the same value of the argument.
The string returned by the functions Exception_Name, Wide_Exception_Name, and
Wide_Wide_Exception_Name has lower bound 1.
Replace paragraph 13: [AI95-00378-01]
Exception_Information returns implementation-defined information about the
exception occurrence.
by:
Exception_Information returns implementation-defined information about the
exception occurrence. The returned string has lower bound 1.
Replace paragraph 14: [AI95-00241-01; AI95-00329-01]
Raise_Exception and Reraise_Occurrence have no effect in the case of Null_Id or
Null_Occurrence. Exception_Message, Exception_Identity, Exception_Name, and
Exception_Information raise Constraint_Error for a Null_Id or Null_Occurrence.
by:
Reraise_Occurrence has no effect in the case of Null_Occurrence.
Raise_Exception and Exception_Name raise Constraint_Error for a Null_Id.
Exception_Message, Exception_Name, and Exception_Information raise
Constraint_Error for a Null_Occurrence. Exception_Identity applied to
Null_Occurrence returns Null_Id.
11.4.2 Pragmas Assert and Assertion_Policy
Insert new clause: [AI95-00286-01]
Pragma Assert is used to assert the truth of a Boolean expression
at any point within a sequence of declarations or statements. Pragma
Assertion_Policy is used to control whether such assertions are to be ignored
by the implementation, checked at run-time, or handled in some
implementation-defined manner.
The form of a pragma Assert is as follows:
pragma Assert([Check =>] Boolean_expression[, [Message =>] string_expression]);
A pragma Assert is allowed at the place where a declarative_item or
a statement is allowed.
The form of a pragma Assertion_Policy is as follows:
pragma Assertion_Policy(policy_identifier);
A pragma Assertion_Policy is a configuration pragma.
The policy_identifier of an Assertion_Policy pragma shall be either
Check, Ignore, or an implementation-defined identifier.
A pragma Assertion_Policy is a configuration pragma that specifies
the assertion policy in effect for the compilation units to which it
applies. Different policies may apply to different compilation
units within the same partition. The default assertion policy is
implementation-defined.
The following language-defined library package exists:
package Ada.Assertions is
pragma Pure(Assertions);
Assertion_Error : exception;
procedure Assert(Check : in Boolean);
procedure Assert(Check : in Boolean; Message : in String);
end Ada.Assertions;
A compilation unit containing a pragma Assert has a semantic dependence on
the Ada.Assertions library unit.
The assertion policy that applies within an instance is the policy that
applies within the generic unit.
An assertion policy specifies how a pragma Assert is interpreted by the
implementation. If the assertion policy is Ignore at the point of a
pragma Assert, the pragma is ignored. If the assertion policy is Check
at the point of a pragma Assert, the elaboration of the pragma consists
of evaluating the Boolean expression, and if it evaluates to False,
evaluating the Message string, if any, and raising the exception
Ada.Assertions.Assertion_Error, with a message if the Message argument is
provided.
Calling the procedure Ada.Assertions.Assert without a Message parameter is
equivalent to:
if Check = False then
raise Ada.Assertions.Assertion_Error;
end if;
Calling the procedure Ada.Assertions.Assert with a Message parameter is
equivalent to:
if Check = False then
raise Ada.Assertions.Assertion_Error with Message;
end if;
The procedures Assertions.Assert have these effects independently of the
assertion policy in effect.
Implementation Permissions
Assertion_Error may be declared by renaming an implementation-defined
exception from another package.
Implementations may define their own assertion policies.
NOTES
Normally, the Boolean expression in an Assert pragma should not
call functions that have significant side-effects when the result of the
expression is True, so that the particular assertion policy in
effect will not affect normal operation of the program.
11.5 Suppressing Checks
Replace paragraph 1: [AI95-00224-01]
A pragma Suppress gives permission to an implementation to omit certain
language-defined checks.
by:
Checking pragmas give instructions to an implementation on handling
language-defined checks. A pragma Suppress gives permission to an
implementation to omit certain language-defined checks, while a pragma
Unsuppress revokes the permission to omit checks.
Replace paragraph 3: [AI95-00224-01]
The form of a pragma Suppress is as follows:
by:
The forms of checking pragmas are as follows:
Replace paragraph 4: [AI95-00224-01]
pragma Suppress(identifier [, [On =>] name]);
by:
pragma Suppress(identifier);
pragma Unsuppress(identifier);
Replace paragraph 5: [AI95-00224-01]
A pragma Suppress is allowed only immediately within a
declarative_part, immediately within a package_specification, or as
a configuration pragma.
by:
A checking pragma is allowed only immediately within a declarative_part,
immediately within a package_specification, or as a configuration pragma.
Replace paragraph 6: [AI95-00224-01]
The identifier shall be the name of a check. The name (if present)
shall statically denote some entity.
by:
The identifier shall be the name of a check.
Delete paragraph 7: [AI95-00224-01]
For a pragma Suppress that is immediately within a
package_specification and includes a name, the name shall denote
an entity (or several overloaded subprograms) declared immediately within the
package_specification.
Replace paragraph 8: [AI95-00224-01]
A pragma Suppress gives permission to an implementation to omit the named check
from the place of the pragma to the end of the innermost enclosing declarative
region, or, if the pragma is given in a package_specification and includes a
name, to the end of the scope of the named entity. If the pragma includes a
name, the permission applies only to checks performed on the named entity, or,
for a subtype, on objects and values of its type. Otherwise, the permission
applies to all entities. If permission has been given to suppress a given
check, the check is said to be suppressed.
by:
A checking pragma applies to the named check in a specific region (see below),
and applies to all entities in that region. A checking pragma given in a
declarative_part or immediately within a package_specification
applies from the place of the pragma to the end of the innermost enclosing
declarative region. The region for a checking pragma given as a configuration
pragma is the declarative region for the entire compilation unit (or units) to
which it applies.
If a checking pragma applies to a generic instantiation, then the checking
pragma also applies to the instance. If a checking pragma applies to a call to
a subprogram that has a pragma Inline applied to it, then the checking
pragma also applies to the inlined subprogram body.
A pragma Suppress gives permission to an implementation to omit the named
check (or every check in the case of All_Checks) for any entities to which it
applies. If permission has been given to suppress a given check, the check is
said to be suppressed.
A pragma Unsuppress revokes the permission to omit the named check (or
every check in the case of All_Checks) given by any pragma Suppress that
applies at the point of the pragma Unsuppress. The permission is revoked
for the region to which the pragma Unsuppress applies. If there is no such
permission at the point of a pragma Unsuppress, then the pragma has
no effect. A later pragma Suppress can renew the permission.
Replace paragraph 11: [AI95-00231-01]
When evaluating a dereference (explicit or implicit), check that the value of
the name is not null. When passing an actual parameter to a formal
access parameter, check that the value of the actual parameter is not null.
When evaluating a discriminant_association for an access discriminant,
check that the value of the discriminant is not null.
by:
When evaluating a dereference (explicit or implicit), check that the value of
the name is not null. When converting to a null-excluding subtype,
check that the converted value is not null.
Insert before paragraph 20: [AI95-00280-01]
- Elaboration_Check
-
When a subprogram or protected entry is called, a task activation is
accomplished, or a generic instantiation is elaborated, check that the body of
the corresponding unit has already been elaborated.
the new paragraphs:
- Accessibility_Check
-
Check the accessibility level of an entity or view.
- Allocation_Check
-
For an allocator, check that the master of any tasks has not yet finished
waiting for dependents, and that the finalization of the collection has not
started.
Replace paragraph 27: [AI95-00224-01]
An implementation is allowed to place restrictions on Suppress pragmas. An
implementation is allowed to add additional check names, with
implementation-defined semantics. When Overflow_Check has been suppressed, an
implementation may also suppress an unspecified subset of the Range_Checks.
by:
An implementation is allowed to place restrictions on checking pragmas,
subject only to the requirement that pragma Unsuppress shall allow any
check names supported by pragma Suppress. An implementation is allowed to
add additional check names, with implementation-defined semantics. When
Overflow_Check has been suppressed, an implementation may also suppress
an unspecified subset of the Range_Checks.
An implementation may support an additional parameter on pragma Unsuppress
similar to the one allowed for pragma Suppress (see J.10). The meaning of
such a parameter is implementation-defined.
Insert after paragraph 29: [AI95-00224-01]
2 There is no guarantee that a suppressed check is actually removed; hence a
pragma Suppress should be used only for efficiency reasons.
the new paragraph:
3 It is possible to give both a pragma Suppress and Unsuppress for the same
check immediately within the same declarative_part. In that case, the last
pragma given determines whether or not the check is suppressed. Similarly,
it is possible to resuppress a check which has been unsuppressed by giving a
pragma Suppress in an inner declarative region.
Replace paragraph 32: [AI95-00224-01]
pragma Suppress(Range_Check);
pragma Suppress(Index_Check, On => Table);
by:
pragma Suppress(Index_Check);
pragma Unsuppress(Overflow_Check);
Section 12: Generic Units
12.3 Generic Instantiation
Replace paragraph 2: [AI95-00218-03]
generic_instantiation ::=
package defining_program_unit_name is
new generic_package_name [generic_actual_part];
| procedure defining_program_unit_name is
new generic_procedure_name [generic_actual_part];
| function defining_designator is
new generic_function_name [generic_actual_part];
by:
generic_instantiation ::=
package defining_program_unit_name is
new generic_package_name [generic_actual_part];
| [overriding_indicator]
procedure defining_program_unit_name is
new generic_procedure_name [generic_actual_part];
| [overriding_indicator]
function defining_designator is
new generic_function_name [generic_actual_part];
12.4 Formal Objects
Delete paragraph 8: [AI95-00287-01]
The type of a generic formal object of mode in shall be nonlimited.
Replace paragraph 9: [AI95-00255-01]
A formal_object_declaration declares a generic formal object. The default
mode is in. For a formal object of mode in, the nominal subtype is the
one denoted by the subtype_mark in the declaration of the formal. For a
formal object of mode in out, its type is determined by the
subtype_mark in the declaration; its nominal subtype is nonstatic, even
if the subtype_mark denotes a static subtype.
by:
A formal_object_declaration declares a generic formal object. The default
mode is in. For a formal object of mode in, the nominal subtype is the
one denoted by the subtype_mark in the declaration of the formal. For a
formal object of mode in out, its type is determined by the
subtype_mark in the declaration; its nominal subtype is nonstatic, even
if the subtype_mark denotes a static subtype; for a composite type, its
nominal subtype is unconstrained if the first subtype of the type is
unconstrained, even if the subtype_mark denotes a constrained subtype.
Replace paragraph 10: [AI95-00269-01]
In an instance, a formal_object_declaration of mode in declares a new
stand-alone constant object whose initialization expression is the actual,
whereas a formal_object_declaration of mode in out declares a view
whose properties are identical to those of the actual.
by:
In an instance, a formal_object_declaration of mode in is a
full constant declaration and declares a new stand-alone constant object
whose initialization expression is the actual, whereas a
formal_object_declaration of mode in out declares a view
whose properties are identical to those of the actual.
12.5 Formal Types
Replace paragraph 3: [AI95-00251-01]
formal_type_definition ::=
formal_private_type_definition
| formal_derived_type_definition
| formal_discrete_type_definition
| formal_signed_integer_type_definition
| formal_modular_type_definition
| formal_floating_point_definition
| formal_ordinary_fixed_point_definition
| formal_decimal_fixed_point_definition
| formal_array_type_definition
| formal_access_type_definition
by:
formal_type_definition ::=
formal_private_type_definition
| formal_derived_type_definition
| formal_discrete_type_definition
| formal_signed_integer_type_definition
| formal_modular_type_definition
| formal_floating_point_definition
| formal_ordinary_fixed_point_definition
| formal_decimal_fixed_point_definition
| formal_array_type_definition
| formal_access_type_definition
| formal_interface_type_definition
Replace paragraph 8: [AI95-00233-01]
The formal type also belongs to each class that contains the determined class.
The primitive subprograms of the type are as for any type in the determined
class. For a formal type other than a formal derived type, these are the
predefined operators of the type. For an elementary formal type, the predefined
operators are implicitly declared immediately after the declaration of the
formal type. For a composite formal type, the predefined operators are
implicitly declared either immediately after the declaration of the formal type,
or later in its immediate scope according to the rules of 7.3.1. In an instance,
the copy of such an implicit declaration declares a view of the predefined
operator of the actual type, even if this operator has been overridden for the
actual type. The rules specific to formal derived types are given in 12.5.1.
by:
The formal type also belongs to each class that contains the determined class.
The primitive subprograms of the type are as for any type in the determined
class. For a formal type other than a formal derived type, these are the
predefined operators of the type. For an elementary formal type, the predefined
operators are implicitly declared immediately after the declaration of the
formal type. For a composite formal type, the predefined operators are
implicitly declared either immediately after the declaration of the formal type,
or later immediately within the declarative region in which the type is
declared according to the rules of 7.3.1. In an instance,
the copy of such an implicit declaration declares a view of the predefined
operator of the actual type, even if this operator has been overridden for the
actual type. The rules specific to formal derived types are given in 12.5.1.
12.5.1 Formal Private and Derived Types
Replace paragraph 3: [AI95-00251-01; AI95-00419-01]
formal_derived_type_definition ::= [abstract] new subtype_mark [with private]
by:
formal_derived_type_definition ::=
[abstract] [limited] new subtype_mark [[and interface_list] with private]
Replace paragraph 5: [AI95-00251-01; AI95-00401-01]
The ancestor subtype of a formal derived type is the subtype denoted by the
subtype_mark of the formal_derived_type_definition. For a formal
derived type declaration, the reserved words with private shall appear if
and only if the ancestor type is a tagged type; in this case the formal derived
type is a private extension of the ancestor type and the ancestor shall not be
a class-wide type. Similarly, the optional reserved word abstract shall
appear only if the ancestor type is a tagged type.
by:
The ancestor subtype of a formal derived type is the subtype denoted by the
subtype_mark of the formal_derived_type_definition. For a formal
derived type declaration, the reserved words with private shall appear if
and only if the ancestor type is a tagged type; in this case the formal derived
type is a private extension of the ancestor type and the ancestor shall not be
a class-wide type. Similarly, an interface_list or the optional reserved
word abstract shall appear only if the ancestor type is a tagged type.
The actual type for a generic formal derived type shall be a descendant of
every progenitor of the formal type.
Insert after paragraph 10: [AI95-00231-01]
-
If the ancestor subtype is an unconstrained discriminated subtype,
then the actual shall have the same number of discriminants, and each
discriminant of the actual shall correspond to a discriminant of the ancestor,
in the sense of 3.7.
the new paragraph:
-
If the ancestor subtype is an access subtype, the actual subtype shall
exclude null if and only if the ancestor subtype excludes null.
Replace paragraph 20: [AI95-00233-01]
If the ancestor type is a composite type that is not an array type, the formal
type inherits components from the ancestor type (including discriminants if a
new discriminant_part is not specified), as for a derived type defined by
a derived_type_definition (see 3.4).
by:
If the ancestor type is a composite type that is not an array type, the formal
type inherits components from the ancestor type (including discriminants if a
new discriminant_part is not specified), as for a derived type defined by
a derived_type_definition (see 3.4 and 7.3.1).
Replace paragraph 21: [AI95-00233-01; AI95-00401-01]
For a formal derived type, the predefined operators and inherited user-defined
subprograms are determined by the ancestor type, and are implicitly declared at
the earliest place, if any, within the immediate scope of the formal type, where
the corresponding primitive subprogram of the ancestor is visible (see 7.3.1).
In an instance, the copy of such an implicit declaration declares a view of the
corresponding primitive subprogram of the ancestor of the formal derived type,
even if this primitive has been overridden for the actual type. When the
ancestor of the formal derived type is itself a formal type, the copy of the
implicit declaration declares a view of the corresponding copied operation of
the ancestor. In the case of a formal private extension, however, the tag of the
formal type is that of the actual type, so if the tag in a call is statically
determined to be that of the formal type, the body executed will be that
corresponding to the actual type.
by:
For a formal derived type, the predefined operators and inherited user-defined
subprograms are determined by the ancestor type, and are implicitly declared at
the earliest place, if any, immediately within the declarative region in which
the formal type is declared, where the corresponding primitive subprogram of
the ancestor is visible (see 7.3.1).
In an instance, the copy of such an implicit declaration declares a view of the
corresponding primitive subprogram of the ancestor of the formal derived type,
even if this primitive has been overridden for the actual type. When the
ancestor of the formal derived type is itself a formal type, the copy of the
implicit declaration declares a view of the corresponding copied operation of
the ancestor. In the case of a formal private extension, however, the tag of the
formal type is that of the actual type, so if the tag in a call is statically
determined to be that of the formal type, the body executed will be that
corresponding to the actual type.
Insert after paragraph 23: [AI95-00158-01]
- S'Definite
-
S'Definite yields True if the actual subtype corresponding to S is definite;
otherwise it yields False. The value of this attribute is of the predefined
type Boolean.
the new paragraphs:
In the case where a formal type is tagged with unknown discriminants, and the
actual type is a class-wide type T'Class:
-
For the purposes of defining the primitive operations of the formal
type, each of the primitive operations of the actual
type is considered to be a subprogram (with an intrinsic calling convention --
see 6.3.1) whose body consists of a dispatching call upon the corresponding
operation of T, with its formal parameters as the actual parameters. If it
is a function, the result of the dispatching call is returned.
-
If the corresponding operation of T has no controlling formal
parameters, then the controlling tag value is determined by the context of the
call, according to the rules for tag-indeterminate calls (see 3.9.2 and 5.2).
In the case where the tag would be statically determined to be that of the
formal type, the call raises Program_Error. If such a function is renamed, any
call on the renaming raises Program_Error.
12.5.4 Formal Access Types
Replace paragraph 4: [AI95-00231-01]
If and only if the general_access_modifier constant applies to the
formal, the actual shall be an access-to-constant type. If the
general_access_modifier all applies to the formal, then the actual
shall be a general access-to-variable type (see 3.10).
by:
If and only if the general_access_modifier constant applies to the
formal, the actual shall be an access-to-constant type. If the
general_access_modifier all applies to the formal, then the actual
shall be a general access-to-variable type (see 3.10). If and only if the
formal subtype excludes null, the actual subtype shall exclude null.
12.5.5 Formal Interface Types
Insert new clause: [AI95-00251-01; AI95-00345-01; AI95-00401-01]
The class determined for a formal interface type is the class of all
interface types.
formal_interface_type_definition ::= interface_type_definition
The actual type shall be an interface type.
The actual type shall be a descendant of every progenitor of the formal type.
The actual type shall be a limited, task, protected, or synchronized interface
if and only if the formal type is also, respectively, a limited, task,
protected, or synchronized interface.
12.6 Formal Subprograms
Replace paragraph 2: [AI95-00260-02]
formal_subprogram_declaration ::= with subprogram_specification [is subprogram_default];
by:
formal_subprogram_declaration ::= formal_abstract_subprogram_declaration
| formal_concrete_subprogram_declaration
formal_concrete_subprogram_declaration ::=
with subprogram_specification [is subprogram_default];
formal_abstract_subprogram_declaration ::=
with subprogram_specification is abstract [subprogram_default];
Replace paragraph 3: [AI95-00348-01]
subprogram_default ::= default_name | <>
by:
subprogram_default ::= default_name | <> | null
Insert after paragraph 4: [AI95-00260-02; AI95-00348-01]
default_name ::= name
the new paragraph:
A subprogram_default of null shall not be specified for a formal
function or for a formal_abstract_subprogram_declaration.
Insert after paragraph 8: [AI95-00260-02]
The profiles of the formal and actual shall be mode-conformant.