Annotated Ada Reference ManualLegal Information
Contents   Index   References   Search   Previous   Next 

 13.12.1 Language-Defined Restrictions and ProfilesLanguage-Defined Restrictions

Static Semantics

1/2
{AI95-00257-01} The following restriction_identifiers are language defined (additional restrictions are defined in the Specialized Needs Annexes):
1.1/3
  {AI05-0241-1} No_Implementation_Aspect_Specifications

There are no implementation-defined aspects specified by an aspect_specification. This restriction applies only to the current compilation or environment, not the entire partition. 
1.a/3
Discussion: {AI05-0241-1} This restriction (as well as others below) applies only to the current compilation, because it is likely that the runtime (and possibly user-written low-level code) will need to use implementation-defined aspects. But a partition-wide restriction applies everywhere, including the runtime. 
2/2
{AI95-00257-01} No_Implementation_Attributes

There are no implementation-defined attributes. This restriction applies only to the current compilation or environment, not the entire partition. 
2.a/3
Discussion: {AI05-0241-1} This restriction (as well as No_Implementation_Pragmas) only applies to the current compilation, because it is likely that the runtime (and possibly user-written low-level code) will need to use implementation-defined entities. But a partition-wide restriction applies everywhere, including the runtime. 
2.1/3
  {AI05-0246-1} No_Implementation_Identifiers

There are no usage names that denote declarations with implementation-defined identifiers that occur within language-defined packages. Such identifiers can arise as follows: 
2.2/3
The following language-defined packages allow implementation-defined identifiers:
2.3/3
package System (see 13.7);
2.4/3
package Standard (see A.1);
2.5/3
package Ada.Command_Line (see A.15);
2.6/3
package Interfaces.C (see B.3);
2.7/3
package Interfaces.C.Strings (see B.3.1);
2.8/3
package Interfaces.C.Pointers (see B.3.2);
2.9/3
package Interfaces.COBOL (see B.4);
2.10/3
package Interfaces.Fortran (see B.5); 
2.11/3
The following language-defined packages contain only implementation-defined identifiers:
2.12/3
package System.Machine_Code (see 13.8);
2.13/3
package Ada.Directories.Information (see A.16);
2.14/3
nested Implementation packages of the Queue containers (see A.18.28-31);
2.15/3
package Interfaces (see B.2);
2.16/3
package Ada.Interrupts.Names (see C.3.2).
2.17/3
For package Standard, Standard.Long_Integer and Standard.Long_Float are considered language-defined identifiers, but identifiers such as Standard.Short_Short_Integer are considered implementation-defined.
2.18/3
This restriction applies only to the current compilation or environment, not the entire partition.
3/2
{AI95-00257-01} No_Implementation_Pragmas

There are no implementation-defined pragmas or pragma arguments. This restriction applies only to the current compilation or environment, not the entire partition.
3.1/3
  {AI05-0242-1} No_Implementation_Units

There is no mention in the context_clause of any implementation-defined descendants of packages Ada, Interfaces, or System. This restriction applies only to the current compilation or environment, not the entire partition.
4/3
{AI95-00368-01} {AI05-0229-1} No_Obsolescent_Features

There is no use of language features defined in Annex J. It is implementation-defined if uses of the renamings of J.1 and of the pragmas of J.15 are detected by this restriction. This restriction applies only to the current compilation or environment, not the entire partition. 
4.a/2
Reason: A user could compile a rename like 
4.b/2
with Ada.Text_IO;
package Text_IO renames Ada.Text_IO;
4.c/2
Such a rename must not be disallowed by this restriction, nor should the compilation of such a rename be restricted by an implementation. Many implementations implement the renames of J.1 by compiling them normally; we do not want to require implementations to use a special mechanism to implement these renames.
4.d/3
{AI05-0229-1} The pragmas have the same functionality as the corresponding aspect (unlike the typical obsolescent feature), and rejecting them could be a significant portability problem for existing code.
5/3
{AI95-00381-01} {AI05-0241-1} The following restriction_parameter_identifier s are is language defined:
6/2
{AI95-00381-01} No_Dependence

Specifies a library unit on which there are no semantic dependences.
6.1/3
  {AI05-0242-1} No_Specification_of_Aspect

Identifies an aspect for which no aspect_specification, attribute_definition_clause, or pragma is given.

Legality Rules

7/2
{AI95-00381-01} The restriction_parameter_argument of a No_Dependence restriction shall be a name; the name shall have the form of a full expanded name of a library unit, but need not denote a unit present in the environment.
7.a/2
Ramification: This name is not resolved. 
7.1/3
  {AI05-0241-1} The restriction_parameter_argument of a No_Specification_of_Aspect restriction shall be an identifier; this identifier does not denote any declaration.
7.b/3
Ramification: This restriction_parameter_argument is not resolved. As for No_Dependence, there is no check that the aspect identifier is meaningful; it might refer to an implementation-defined aspect on one implementation, but nothing at all on another implementation. Of course, a good implementation will warn if the aspect is unknown to it.

Post-Compilation Rules

8/3
{AI95-00381-01} {AI05-0241-1} No compilation unit included in the partition shall depend semantically on the library unit identified by the name of a No_Dependence restriction.
8.a/2
Ramification: There is no requirement that the library unit actually exist. One possible use of the pragma is to prevent the use of implementation-defined units; when the program is ported to a different compiler, it is perfectly reasonable that no unit with the name exist. 

Static Semantics

9/3
{AI05-0246-1} The following profile_identifier is language defined:
10/3
 {AI05-0246-1} No_Implementation_Extensions

11/3
 {AI05-0246-1} For usage profile No_Implementation_Extensions, there shall be no profile_pragma_argument_associations.
12/3
 {AI05-0246-1} The No_Implementation_Extensions usage profile is equivalent to the following restrictions: 
13/3
No_Implementation_Aspect_Specifications,
No_Implementation_Attributes,
No_Implementation_Identifiers,
No_Implementation_Pragmas,
No_Implementation_Units.

Extensions to Ada 95

13.a/2
{AI95-00257-01} {AI95-00368-01} Restrictions No_Implementation_Attributes, No_Implementation_Pragmas, and No_Obsolescent_Features are new.
13.b/2
{AI95-00381-01} Restriction No_Dependence is new. 

Extensions to Ada 2005

13.c/3
{AI05-0241-1} {AI05-0242-1} {AI05-0246-1} Restrictions No_Implementation_Aspect_Specifications, No_Implementation_Identifiers, No_Implementation_Units, and No_Specification_of_Aspect are new.
13.d/3
{AI05-0246-1} Profile No_Implementation_Extensions is new.

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe