sem_ch12.adb, [...]: New calling sequence for Analyze_Aspect_Specifications
[gcc.git] / gcc / ada / sinfo.ads
index 2b2d8828c95f4542247be31a33da09f8bfc9cdb5..cdf71bc51cafa958ed2736f172fe36e3f5723c99 100644 (file)
@@ -59,15 +59,19 @@ package Sinfo is
 
    --  If changes are made to this file, a number of related steps must be
    --  carried out to ensure consistency. First, if a field access function is
-   --  added, it appears in seven places:
-
-   --    The documentation associated with the node
-   --    The spec of the access function in sinfo.ads
-   --    The body of the access function in sinfo.adb
-   --    The pragma Inline at the end of sinfo.ads for the access function
-   --    The spec of the set procedure in sinfo.ads
-   --    The body of the set procedure in sinfo.adb
-   --    The pragma Inline at the end of sinfo.ads for the set procedure
+   --  added, it appears in these places:
+
+   --    In sinfo.ads:
+   --      The documentation associated with the field (if semantic)
+   --      The documentation associated with the node
+   --      The spec of the access function
+   --      The spec of the set procedure
+   --      The entries in Is_Syntactic_Field
+   --      The pragma Inline for the access function
+   --      The pragma Inline for the set procedure
+   --    In sinfo.adb:
+   --      The body of the access function
+   --      The body of the set procedure
 
    --  The field chosen must be consistent in all places, and, for a node that
    --  is a subexpression, must not overlap any of the standard expression
@@ -96,10 +100,10 @@ package Sinfo is
 
    --  Finally, four utility programs must be run:
 
-   --    Run CSinfo to check that you have made the changes consistently. It
-   --     checks most of the rules given above, with clear error messages. This
-   --     utility reads sinfo.ads and sinfo.adb and generates a report to
-   --     standard output.
+   --    (Optional.) Run CSinfo to check that you have made the changes
+   --     consistently. It checks most of the rules given above. This utility
+   --     reads sinfo.ads and sinfo.adb and generates a report to standard
+   --     output. This step is optional because XSinfo runs CSinfo.
 
    --    Run XSinfo to create sinfo.h, the corresponding C header. This
    --     utility reads sinfo.ads and generates sinfo.h. Note that it does
@@ -116,8 +120,8 @@ package Sinfo is
    --     spec of the Nmake package which contains functions for constructing
    --     nodes.
 
-   --  All of the above steps except CSinfo are done automatically by the
-   --  build scripts when you do a full bootstrap.
+   --  The above steps are done automatically by the build scripts when you do
+   --  a full bootstrap.
 
    --  Note: sometime we could write a utility that actually generated the body
    --  of sinfo from the spec instead of simply checking it, since, as noted
@@ -493,13 +497,6 @@ package Sinfo is
    --    has been inserted at the flagged node. This is used to avoid the
    --    generation of duplicate checks.
 
-   --  Has_Local_Raise (Flag8-Sem)
-   --    Present in exception handler nodes. Set if the handler can be entered
-   --    via a local raise that gets transformed to a goto statement. This will
-   --    always be set if Local_Raise_Statements is non-empty, but can also be
-   --    set as a result of generation of N_Raise_xxx nodes, or flags set in
-   --    nodes requiring generation of back end checks.
-
    ------------------------------------
    -- Description of Semantic Fields --
    ------------------------------------
@@ -587,14 +584,6 @@ package Sinfo is
    --    is used for translation of the at end handler into a normal exception
    --    handler.
 
-   --  Aspect_Cancel (Flag11-Sem)
-   --    Processing of aspect specifications typically generates pragmas and
-   --    attribute definition clauses that are inserted into the tree after
-   --    the declaration node to get the desired aspect effect. In the case
-   --    of Boolean aspects that use "=> False" to cancel the effect of an
-   --    aspect (i.e. turn if off), the generated pragma has the Aspect_Cancel
-   --    flag set to indicate that the pragma operates in the opposite sense.
-
    --  Aspect_Rep_Item (Node2-Sem)
    --    Present in N_Aspect_Specification nodes. Points to the corresponding
    --    pragma/attribute definition node used to process the aspect.
@@ -805,6 +794,12 @@ package Sinfo is
    --    for the default expression). Default_Expression is used for
    --    conformance checking.
 
+   --  Default_Storage_Pool (Node3-Sem)
+   --    This field is present in N_Compilation_Unit_Aux nodes. It is set to a
+   --    copy of Opt.Default_Pool at the end of the compilation unit. See
+   --    package Opt for details. This is used for inheriting the
+   --    Default_Storage_Pool in child units.
+
    --  Discr_Check_Funcs_Built (Flag11-Sem)
    --    This flag is present in N_Full_Type_Declaration nodes. It is set when
    --    discriminant checking functions are constructed. The purpose is to
@@ -1098,6 +1093,14 @@ package Sinfo is
    --    declaration is treated as an implicit reference to the formal in the
    --    ali file.
 
+   --  From_Dynamic_Predicate (Flag7-Sem)
+   --    Set for generated pragma Predicate node if this is generated by a
+   --    Dynamic_Predicate aspect.
+
+   --  From_Static_Predicate (Flag8-Sem)
+   --    Set for generated pragma Predicate node if this is generated by a
+   --    Static_Predicate aspect.
+
    --  Generic_Parent (Node5-Sem)
    --    Generic_Parent is defined on declaration nodes that are instances. The
    --    value of Generic_Parent is the generic entity from which the instance
@@ -1122,6 +1125,13 @@ package Sinfo is
    --    handler is deleted during optimization. For further details on why
    --    this is required, see Exp_Ch11.Remove_Handler_Entries.
 
+   --  Has_Local_Raise (Flag8-Sem)
+   --    Present in exception handler nodes. Set if the handler can be entered
+   --    via a local raise that gets transformed to a goto statement. This will
+   --    always be set if Local_Raise_Statements is non-empty, but can also be
+   --    set as a result of generation of N_Raise_xxx nodes, or flags set in
+   --    nodes requiring generation of back end checks.
+
    --  Has_No_Elaboration_Code (Flag17-Sem)
    --    A flag that appears in the N_Compilation_Unit node to indicate whether
    --    or not elaboration code is present for this unit. It is initially set
@@ -1133,14 +1143,14 @@ package Sinfo is
    --    generate elaboration code, and non-preelaborated packages which do
    --    not generate elaboration code.
 
-   --  Has_Pragma_CPU (Flag10-Sem)
+   --  Has_Pragma_CPU (Flag14-Sem)
    --    A flag present in N_Subprogram_Body and N_Task_Definition nodes to
    --    flag the presence of a CPU pragma in the declaration sequence (public
    --    or private in the task case).
 
    --  Has_Pragma_Suppress_All (Flag14-Sem)
    --    This flag is set in an N_Compilation_Unit node if the Suppress_All
-   --    pragma appears anywhere in the unit. This accomodates the rather
+   --    pragma appears anywhere in the unit. This accommodates the rather
    --    strange placement rules of other compilers (DEC permits it at the
    --    end of a unit, and Rational allows it as a program unit pragma). We
    --    allow it anywhere at all, and consider it equivalent to a pragma
@@ -1242,6 +1252,10 @@ package Sinfo is
    --    expansion of an asynchronous entry call. Such a block needs cleanup
    --    handler to assure that the call is cancelled.
 
+   --  Is_Boolean_Aspect (Flag16-Sem)
+   --    Present in N_Aspect_Specification node. Set if the aspect is for a
+   --    boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
+
    --  Is_Component_Left_Opnd  (Flag13-Sem)
    --  Is_Component_Right_Opnd (Flag14-Sem)
    --    Present in concatenation nodes, to indicate that the corresponding
@@ -1251,7 +1265,8 @@ package Sinfo is
    --  Is_Delayed_Aspect (Flag14-Sem)
    --    Present in N_Pragma and N_Attribute_Definition_Clause nodes which
    --    come from aspect specifications, where the evaluation of the aspect
-   --    must be delayed to the freeze point.
+   --    must be delayed to the freeze point. This flag is also set True in
+   --    the corresponding N_Aspect_Specification node.
 
    --  Is_Controlling_Actual (Flag16-Sem)
    --    This flag is set on in an expression that is a controlling argument in
@@ -1445,7 +1460,7 @@ package Sinfo is
 
    --  Next_Exit_Statement (Node3-Sem)
    --    Present in N_Exit_Statement nodes. The exit statements for a loop are
-   --    chained (in reverse order of appearence) from the First_Exit_Statement
+   --    chained (in reverse order of appearance) from the First_Exit_Statement
    --    field of the E_Loop entity for the loop. Next_Exit_Statement points to
    --    the next entry on this chain (Empty = end of list).
 
@@ -1456,7 +1471,7 @@ package Sinfo is
    --    A postorder traversal of the tree whose nodes are units and whose
    --    links are with_clauses defines the order in which Inspector must
    --    examine a compiled unit and its full context. This ordering ensures
-   --    that any subprogram call is examined after the subprogram declartion
+   --    that any subprogram call is examined after the subprogram declaration
    --    has been seen.
 
    --  Next_Named_Actual (Node4-Sem)
@@ -1723,6 +1738,13 @@ package Sinfo is
    --    value of a type whose size is not known at compile time on the
    --    secondary stack.
 
+   --  Suppress_Assignment_Checks (Flag18-Sem)
+   --    Used in generated N_Assignment_Statement nodes to suppress predicate
+   --    and range checks in cases where the generated code knows that the
+   --    value being assigned is in range and satisfies any predicate. Also
+   --    can be set in N_Object_Declaration nodes, to similarly suppress any
+   --    checks on the initializing value.
+
    --  Suppress_Loop_Warnings (Flag17-Sem)
    --    Used in N_Loop_Statement node to indicate that warnings within the
    --    body of the loop should be suppressed. This is set when the range
@@ -1774,6 +1796,12 @@ package Sinfo is
    --    the body, so this flag is used to generate the proper message (see
    --    Sem_Util.Check_Unused_Withs for details)
 
+   --  Used_Operations (Elist5-Sem)
+   --    Present in N_Use_Type_Clause nodes. Holds the list of operations that
+   --    are made potentially use-visible by the clause. Simplifies processing
+   --    on exit from the scope of the use_type_clause, in particular in the
+   --    case of Use_All_Type, when those operations several scopes.
+
    --  Was_Originally_Stub (Flag13-Sem)
    --    This flag is set in the node for a proper body that replaces stub.
    --    During the analysis procedure, stubs in some situations get rewritten
@@ -1931,7 +1959,7 @@ package Sinfo is
 
       --  Note: the value of an integer literal node created by the front end
       --  is never outside the range of values of the base type. However, it
-      --  can be the case that the value is outside the range of the
+      --  can be the case that the created value is outside the range of the
       --  particular subtype. This happens in the case of integer overflows
       --  with checks suppressed.
 
@@ -2049,9 +2077,10 @@ package Sinfo is
       --  From_Aspect_Specification (Flag13-Sem)
       --  Is_Delayed_Aspect (Flag14-Sem)
       --  Import_Interface_Present (Flag16-Sem)
-      --  Aspect_Cancel (Flag11-Sem)
       --  Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
       --  Class_Present (Flag6) set if from Aspect with 'Class
+      --  From_Dynamic_Predicate (Flag7-Sem) Set if Dynamic_Predicate aspect
+      --  From_Static_Predicate (Flag8-Sem) Set if Static_Predicate aspect
 
       --  Note: we should have a section on what pragmas are passed on to
       --  the back end to be processed. This section should note that pragma
@@ -2321,6 +2350,7 @@ package Sinfo is
       --  Exception_Junk (Flag8-Sem)
       --  Is_Subprogram_Descriptor (Flag16-Sem)
       --  Has_Init_Expression (Flag14)
+      --  Suppress_Assignment_Checks (Flag18-Sem)
 
       -------------------------------------
       -- 3.3.1  Defining Identifier List --
@@ -3498,14 +3528,24 @@ package Sinfo is
       --------------------------------------------------
 
       --  EXPRESSION ::=
-      --    RELATION {and RELATION} | RELATION {and then RELATION}
-      --  | RELATION {or RELATION}  | RELATION {or else RELATION}
-      --  | RELATION {xor RELATION}
+      --    RELATION {LOGICAL_OPERATOR RELATION}
 
-      --  RELATION ::=
+      --  CHOICE_EXPRESSION ::=
+      --    CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
+
+      --  CHOICE_RELATION ::=
       --    SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
-      --  | SIMPLE_EXPRESSION [not] in RANGE
-      --  | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
+
+      --  RELATION ::=
+      --    SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
+
+      --  MEMBERSHIP_CHOICE_LIST ::=
+      --    MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
+
+      --  MEMBERSHIP_CHOICE ::=
+      --    CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
+
+      --  LOGICAL_OPERATOR ::= and | and then | or | or else | xor
 
       --  SIMPLE_EXPRESSION ::=
       --    [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
@@ -3520,6 +3560,14 @@ package Sinfo is
       --  constituent components of an expression (e.g. identifier is
       --  an example of an expression).
 
+      --  Note: the above syntax is that Ada 2012 syntax which restricts
+      --  choice relations to simple expressions to avoid ambiguities in
+      --  some contexts with set membership notation. It has been decided
+      --  that in retrospect, the Ada 95 change allowing general expressions
+      --  in this context was a mistake, so we have reverted to the above
+      --  syntax in Ada 95 and Ada 2005 modes (the restriction to simple
+      --  expressions was there in Ada 83 from the start).
+
       ------------------
       -- 4.4  Primary --
       ------------------
@@ -3605,8 +3653,13 @@ package Sinfo is
       ---------------------------
 
       --  RELATION ::=
-      --    SIMPLE_EXPRESSION [not] in RANGE
-      --  | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
+      --    SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
+
+      --  MEMBERSHIP_CHOICE_LIST ::=
+      --    MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
+
+      --  MEMBERSHIP_CHOICE ::=
+      --    CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
 
       --  Note: although the grammar above allows only a range or a subtype
       --  mark, the parser in fact will accept any simple expression in place
@@ -3614,19 +3667,15 @@ package Sinfo is
       --  to deal with, and diagnose a simple expression other than a name for
       --  the right operand. This simplifies error recovery in the parser.
 
-      --  If extensions are enabled, the grammar is as follows:
-
-      --  RELATION ::=
-      --    SIMPLE_EXPRESSION [not] in SET_ALTERNATIVE {| SET_ALTERNATIVE}
-
-      --  SET_ALTERNATIVE ::= RANGE | SUBTYPE_MARK
+      --  The Alternatives field below is present only if there is more
+      --  than one Membership_Choice present (which is legitimate only in
+      --  Ada 2012 mode) in which case Right_Opnd is Empty, and Alternatives
+      --  contains the list of choices. In the tree passed to the back end,
+      --  Alternatives is always No_List, and Right_Opnd is set (i.e. the
+      --  expansion circuitry expands out the complex set membership case
+      --  using simple membership operations).
 
-      --  The Alternatives field below is present only if there is more than
-      --  one Set_Alternative present, in which case Right_Opnd is set to
-      --  Empty, and Alternatives contains the list of alternatives. In the
-      --  tree passed to the back end, Alternatives is always No_List, and
-      --  Right_Opnd is set (i.e. the expansion circuitry expands out the
-      --  complex set membership case using simple membership operations).
+      --  Should we rename Alternatives here to Membership_Choices ???
 
       --  N_In
       --  Sloc points to IN
@@ -3807,6 +3856,26 @@ package Sinfo is
       --  point operands if the Treat_Fixed_As_Integer flag is set and will
       --  thus treat these nodes in identical manner, ignoring small values.
 
+      ---------------------------------
+      -- 4.5.9 Quantified Expression --
+      ---------------------------------
+
+      --  QUANTIFIED_EXPRESSION ::=
+      --    for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
+      --  | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
+      --
+      --  QUANTIFIER ::= all | some
+
+      --  At most one of (Iterator_Specification, Loop_Parameter_Specification)
+      --  is present at a time, in which case the other one is empty.
+
+      --  N_Quantified_Expression
+      --  Sloc points to FOR
+      --  Iterator_Specification (Node2)
+      --  Loop_Parameter_Specification (Node4)
+      --  Condition (Node1)
+      --  All_Present (Flag15)
+
       --------------------------
       -- 4.6  Type Conversion --
       --------------------------
@@ -4003,6 +4072,7 @@ package Sinfo is
       --  Backwards_OK (Flag6-Sem)
       --  No_Ctrl_Actions (Flag7-Sem)
       --  Componentwise_Assignment (Flag14-Sem)
+      --  Suppress_Assignment_Checks (Flag18-Sem)
 
       --  Note: if a range check is required, then the Do_Range_Check flag
       --  is set in the Expression (right hand side), with the check being
@@ -4130,7 +4200,7 @@ package Sinfo is
       --  explicit loop identifier. Otherwise the parser leaves this field
       --  set to Empty, and then the semantic processing for a loop statement
       --  creates an identifier, setting the Has_Created_Identifier flag to
-      --  True. So after semantic anlaysis, the Identifier is always set,
+      --  True. So after semantic analysis, the Identifier is always set,
       --  referencing an identifier whose entity has an Ekind of E_Loop.
 
       --------------------------
@@ -4138,7 +4208,13 @@ package Sinfo is
       --------------------------
 
       --  ITERATION_SCHEME ::=
-      --    while CONDITION | for LOOP_PARAMETER_SPECIFICATION
+      --    while CONDITION
+      --  | for LOOP_PARAMETER_SPECIFICATION
+      --  | for ITERATOR_SPECIFICATION
+
+      --  At most one of (Iterator_Specification, Loop_Parameter_Specification)
+      --  is present at a time, in which case the other one is empty. Both are
+      --  empty in the case of a WHILE loop.
 
       --  Gigi restriction: This expander ensures that the type of the
       --  Condition field is always Standard.Boolean, even if the type
@@ -4148,6 +4224,7 @@ package Sinfo is
       --  Sloc points to WHILE or FOR
       --  Condition (Node1) (set to Empty if FOR case)
       --  Condition_Actions (List3-Sem)
+      --  Iterator_Specification (Node2) (set to Empty if WHILE case)
       --  Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
 
       ---------------------------------------
@@ -4163,6 +4240,24 @@ package Sinfo is
       --  Reverse_Present (Flag15)
       --  Discrete_Subtype_Definition (Node4)
 
+      ----------------------------------
+      -- 5.5.1 Iterator specification --
+      ----------------------------------
+
+      --  ITERATOR_SPECIFICATION ::=
+      --    DEFINING_IDENTIFIER in [reverse] NAME
+      --  | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
+
+      --  N_Iterator_Specification
+      --  Sloc points to defining identifier
+      --  Defining_Identifier (Node1)
+      --  Name (Node2)
+      --  Reverse_Present (Flag15)
+      --  Of_Present (Flag16)
+      --  Subtype_Indication (Node5)
+
+      --  Note: The Of_Present flag distinguishes the two forms
+
       --------------------------
       -- 5.6  Block Statement --
       --------------------------
@@ -4491,19 +4586,19 @@ package Sinfo is
       --  Is_Task_Master (Flag5-Sem)
       --  Was_Originally_Stub (Flag13-Sem)
       --  Has_Relative_Deadline_Pragma (Flag9-Sem)
-      --  Has_Pragma_CPU (Flag10-Sem)
+      --  Has_Pragma_CPU (Flag14-Sem)
 
-      ------------------------------
-      -- Parameterized Expression --
-      ------------------------------
+      -------------------------
+      -- Expression Function --
+      -------------------------
 
       --  This is an Ada 2012 extension, we put it here for now, to be labeled
       --  and put in its proper section when we know exactly where that is!
 
-      --  PARAMETERIZED_EXPRESSION ::=
+      --  EXPRESSION_FUNCTION ::=
       --    FUNCTION SPECIFICATION IS (EXPRESSION);
 
-      --  N_Parameterized_Expression
+      --  N_Expression_Function
       --  Sloc points to FUNCTION
       --  Specification (Node1)
       --  Expression (Node3)
@@ -4675,8 +4770,7 @@ package Sinfo is
       ------------------------------
 
       --  PACKAGE_DECLARATION ::=
-      --    PACKAGE_SPECIFICATION
-      --      [ASPECT_SPECIFICATIONS];
+      --    PACKAGE_SPECIFICATION;
 
       --  Note: the activation chain entity for a package spec is used for
       --  all tasks declared in the package spec, or in the package body.
@@ -4693,7 +4787,9 @@ package Sinfo is
       --------------------------------
 
       --  PACKAGE_SPECIFICATION ::=
-      --    package DEFINING_PROGRAM_UNIT_NAME is
+      --    package DEFINING_PROGRAM_UNIT_NAME
+      --      [ASPECT_SPECIFICATIONS]
+      --    is
       --      {BASIC_DECLARATIVE_ITEM}
       --    [private
       --      {BASIC_DECLARATIVE_ITEM}]
@@ -4714,7 +4810,9 @@ package Sinfo is
       -----------------------
 
       --  PACKAGE_BODY ::=
-      --    package body DEFINING_PROGRAM_UNIT_NAME is
+      --    package body DEFINING_PROGRAM_UNIT_NAME
+      --      [ASPECT_SPECIFICATIONS]
+      --    is
       --      DECLARATIVE_PART
       --    [begin
       --      HANDLED_SEQUENCE_OF_STATEMENTS]
@@ -4812,6 +4910,7 @@ package Sinfo is
       --  Subtype_Marks (List2)
       --  Next_Use_Clause (Node3-Sem)
       --  Hidden_By_Use_Clause (Elist4-Sem)
+      --  Used_Operations (Elist5-Sem)
       --  All_Present (Flag15)
 
       -------------------------------
@@ -4925,8 +5024,8 @@ package Sinfo is
 
       --  TASK_TYPE_DECLARATION ::=
       --    task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
-      --      [is [new INTERFACE_LIST with] TASK_DEFINITION]
-      --        [ASPECT_SPECIFICATIONS];
+      --      [ASPECT_SPECIFICATIONS]
+      --    [is [new INTERFACE_LIST with] TASK_DEFINITION];
 
       --  N_Task_Type_Declaration
       --  Sloc points to TASK
@@ -4943,8 +5042,8 @@ package Sinfo is
 
       --  SINGLE_TASK_DECLARATION ::=
       --    task DEFINING_IDENTIFIER
-      --      [is [new INTERFACE_LIST with] TASK_DEFINITION]
-      --        [ASPECT_SPECIFICATIONS];
+      --      [ASPECT_SPECIFICATIONS]
+      --    [is [new INTERFACE_LIST with] TASK_DEFINITION];
 
       --  N_Single_Task_Declaration
       --  Sloc points to TASK
@@ -4975,7 +5074,7 @@ package Sinfo is
       --  Has_Task_Info_Pragma (Flag7-Sem)
       --  Has_Task_Name_Pragma (Flag8-Sem)
       --  Has_Relative_Deadline_Pragma (Flag9-Sem)
-      --  Has_Pragma_CPU (Flag10-Sem)
+      --  Has_Pragma_CPU (Flag14-Sem)
 
       --------------------
       -- 9.1  Task Item --
@@ -4988,7 +5087,9 @@ package Sinfo is
       --------------------
 
       --  TASK_BODY ::=
-      --    task body task_DEFINING_IDENTIFIER is
+      --    task body task_DEFINING_IDENTIFIER
+      --      [ASPECT_SPECIFICATIONS]
+      --    is
       --      DECLARATIVE_PART
       --    begin
       --      HANDLED_SEQUENCE_OF_STATEMENTS
@@ -5012,8 +5113,8 @@ package Sinfo is
 
       --  PROTECTED_TYPE_DECLARATION ::=
       --    protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
-      --      is [new INTERFACE_LIST with] PROTECTED_DEFINITION
-      --        {ASPECT_SPECIFICATIONS];
+      --      [ASPECT_SPECIFICATIONS]
+      --    is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
 
       --  Note: protected type declarations are not permitted in Ada 83 mode
 
@@ -5032,8 +5133,8 @@ package Sinfo is
 
       --  SINGLE_PROTECTED_DECLARATION ::=
       --    protected DEFINING_IDENTIFIER
-      --      is [new INTERFACE_LIST with] PROTECTED_DEFINITION
-      --        [ASPECT_SPECIFICATIONS];
+      --      [ASPECT_SPECIFICATIONS]
+      --    is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
 
       --  Note: single protected declarations are not allowed in Ada 83 mode
 
@@ -5081,7 +5182,9 @@ package Sinfo is
       -------------------------
 
       --  PROTECTED_BODY ::=
-      --    protected body DEFINING_IDENTIFIER is
+      --    protected body DEFINING_IDENTIFIER
+      --      [ASPECT_SPECIFICATIONS];
+      --    is
       --      {PROTECTED_OPERATION_ITEM}
       --    end [protected_IDENTIFIER];
 
@@ -5557,8 +5660,8 @@ package Sinfo is
       --  the library item.
 
       --  To deal with all these problems, we create an auxiliary node for
-      --  a compilation unit, referenced from the N_Compilation_Unit node
-      --  that contains these three items.
+      --  a compilation unit, referenced from the N_Compilation_Unit node,
+      --  that contains these items.
 
       --  N_Compilation_Unit
       --  Sloc points to first token of defining unit name
@@ -5580,6 +5683,7 @@ package Sinfo is
       --  Actions (List1) (set to No_List if no actions)
       --  Pragmas_After (List5) pragmas after unit (set to No_List if none)
       --  Config_Pragmas (List4) config pragmas (set to Empty_List if none)
+      --  Default_Storage_Pool (Node3-Sem)
 
       --------------------------
       -- 10.1.1  Library Item --
@@ -6459,9 +6563,18 @@ package Sinfo is
       --  Class_Present (Flag6) Set if 'Class present
       --  Next_Rep_Item (Node5-Sem)
       --  Split_PPC (Flag17) Set if split pre/post attribute
+      --  Is_Boolean_Aspect (Flag16-Sem)
+      --  Is_Delayed_Aspect (Flag14-Sem)
 
       --  Note: Aspect_Specification is an Ada 2012 feature
 
+      --  Note: The Identifier serves to identify the aspect involved (it
+      --  is the aspect whose name corresponds to the Chars field). This
+      --  means that the other fields of this identifier are unused, and
+      --  in particular we use the Entity field of this identifier to save
+      --  a copy of the expression for visibility analysis, see spec of
+      --  Sem_Ch13 for full details of this usage.
+
       --  Note: When a Pre or Post aspect specification is processed, it is
       --  broken into AND THEN sections. The left most section has Split_PPC
       --  set to False, indicating that it is the original specification (e.g.
@@ -6722,7 +6835,7 @@ package Sinfo is
       --      CASE_EXPRESSION_ALTERNATIVE
       --      {CASE_EXPRESSION_ALTERNATIVE}
 
-      --  Note that the Alternatives cannot include pragmas (this constrasts
+      --  Note that the Alternatives cannot include pragmas (this contrasts
       --  with the situation of case statements where pragmas are allowed).
 
       --  N_Case_Expression
@@ -6746,7 +6859,7 @@ package Sinfo is
 
       --  Note: The Actions field temporarily holds any actions associated with
       --  evaluation of the Expression. During expansion of the case expression
-      --  these actions are wrapped into the an N_Expressions_With_Actions node
+      --  these actions are wrapped into an N_Expressions_With_Actions node
       --  replacing the original expression.
 
       ----------------------------
@@ -6775,7 +6888,7 @@ package Sinfo is
 
       --  And we add the additional constructs
 
-      --  PRIMARY ::= ( CONDITIONAL_EXPRESION )
+      --  PRIMARY ::= ( CONDITIONAL_EXPRESSION )
       --  PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
 
       --  Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
@@ -6824,7 +6937,7 @@ package Sinfo is
 
       --  This node is created by the analyzer/expander to handle some
       --  expansion cases, notably short circuit forms where there are
-      --  actions associated with the right hand operand.
+      --  actions associated with the right-hand side operand.
 
       --  The N_Expression_With_Actions node represents an expression with
       --  an associated set of actions (which are executable statements and
@@ -6838,8 +6951,8 @@ package Sinfo is
       --  executing all the actions.
 
       --  Note: if the actions contain declarations, then these declarations
-      --  maybe referenced with in the expression. It is thus appropriate for
-      --  the back end to create a scope that encompasses the construct (any
+      --  may be referenced within the expression. It is thus appropriate for
+      --  the back-end to create a scope that encompasses the construct (any
       --  declarations within the actions will definitely not be referenced
       --  once elaboration of the construct is completed).
 
@@ -7332,7 +7445,14 @@ package Sinfo is
       N_Empty,
       N_Pragma_Argument_Association,
 
-      --  N_Has_Etype
+      --  N_Has_Etype, N_Has_Chars
+
+      --  Note: of course N_Error does not really have Etype or Chars fields,
+      --  and any attempt to access these fields in N_Error will cause an
+      --  error, but historically this always has been positioned so that an
+      --  "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
+      --  Most likely this makes coding easier somewhere but still seems
+      --  undesirable. To be investigated some time ???
 
       N_Error,
 
@@ -7436,6 +7556,7 @@ package Sinfo is
       N_Null,
       N_Procedure_Call_Statement,
       N_Qualified_Expression,
+      N_Quantified_Expression,
 
       --  N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
 
@@ -7468,13 +7589,14 @@ package Sinfo is
 
       N_Component_Declaration,
       N_Entry_Declaration,
+      N_Expression_Function,
       N_Formal_Object_Declaration,
       N_Formal_Type_Declaration,
       N_Full_Type_Declaration,
       N_Incomplete_Type_Declaration,
+      N_Iterator_Specification,
       N_Loop_Parameter_Specification,
       N_Object_Declaration,
-      N_Parameterized_Expression,
       N_Protected_Type_Declaration,
       N_Private_Extension_Declaration,
       N_Private_Type_Declaration,
@@ -7563,7 +7685,7 @@ package Sinfo is
       N_Code_Statement,
       N_Conditional_Entry_Call,
 
-      --  N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
+      --  N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
 
       N_Delay_Relative_Statement,
       N_Delay_Until_Statement,
@@ -7945,9 +8067,6 @@ package Sinfo is
    function Array_Aggregate
      (N : Node_Id) return Node_Id;    -- Node3
 
-   function Aspect_Cancel
-     (N : Node_Id) return Boolean;    -- Flag11
-
    function Aspect_Rep_Item
      (N : Node_Id) return Node_Id;    -- Node2
 
@@ -8095,6 +8214,9 @@ package Sinfo is
    function Default_Expression
      (N : Node_Id) return Node_Id;    -- Node5
 
+   function Default_Storage_Pool
+     (N : Node_Id) return Node_Id;    -- Node3
+
    function Default_Name
      (N : Node_Id) return Node_Id;    -- Node2
 
@@ -8287,6 +8409,12 @@ package Sinfo is
    function From_Default
      (N : Node_Id) return Boolean;    -- Flag6
 
+   function From_Dynamic_Predicate
+     (N : Node_Id) return Boolean;    -- Flag7
+
+   function From_Static_Predicate
+     (N : Node_Id) return Boolean;    -- Flag8
+
    function Generic_Associations
      (N : Node_Id) return List_Id;    -- List3
 
@@ -8324,7 +8452,7 @@ package Sinfo is
      (N : Node_Id) return Boolean;    -- Flag17
 
    function Has_Pragma_CPU
-     (N : Node_Id) return Boolean;    -- Flag10
+     (N : Node_Id) return Boolean;    -- Flag14
 
    function Has_Pragma_Priority
      (N : Node_Id) return Boolean;    -- Flag6
@@ -8398,6 +8526,9 @@ package Sinfo is
    function Is_Asynchronous_Call_Block
      (N : Node_Id) return Boolean;    -- Flag7
 
+   function Is_Boolean_Aspect
+     (N : Node_Id) return Boolean;    -- Flag16
+
    function Is_Component_Left_Opnd
      (N : Node_Id) return Boolean;    -- Flag13
 
@@ -8461,6 +8592,9 @@ package Sinfo is
    function Iteration_Scheme
      (N : Node_Id) return Node_Id;    -- Node2
 
+   function Iterator_Specification
+     (N : Node_Id) return Node_Id;    -- Node2
+
    function Itype
      (N : Node_Id) return Entity_Id;  -- Node1
 
@@ -8581,6 +8715,9 @@ package Sinfo is
    function Object_Definition
      (N : Node_Id) return Node_Id;    -- Node4
 
+   function Of_Present
+     (N : Node_Id) return Boolean;    -- Flag16
+
    function Original_Discriminant
      (N : Node_Id) return Node_Id;    -- Node2
 
@@ -8758,6 +8895,9 @@ package Sinfo is
    function Subtype_Marks
      (N : Node_Id) return List_Id;    -- List2
 
+   function Suppress_Assignment_Checks
+     (N : Node_Id) return Boolean;    -- Flag18
+
    function Suppress_Loop_Warnings
      (N : Node_Id) return Boolean;    -- Flag17
 
@@ -8815,6 +8955,9 @@ package Sinfo is
    function Visible_Declarations
      (N : Node_Id) return List_Id;    -- List2
 
+   function Used_Operations
+     (N : Node_Id) return Elist_Id;   -- Elist5
+
    function Was_Originally_Stub
      (N : Node_Id) return Boolean;    -- Flag13
 
@@ -8899,9 +9042,6 @@ package Sinfo is
    procedure Set_Array_Aggregate
      (N : Node_Id; Val : Node_Id);            -- Node3
 
-   procedure Set_Aspect_Cancel
-     (N : Node_Id; Val : Boolean := True);    -- Flag11
-
    procedure Set_Aspect_Rep_Item
      (N : Node_Id; Val : Node_Id);            -- Node2
 
@@ -9049,6 +9189,9 @@ package Sinfo is
    procedure Set_Default_Expression
      (N : Node_Id; Val : Node_Id);            -- Node5
 
+   procedure Set_Default_Storage_Pool
+     (N : Node_Id; Val : Node_Id);            -- Node3
+
    procedure Set_Default_Name
      (N : Node_Id; Val : Node_Id);            -- Node2
 
@@ -9238,6 +9381,12 @@ package Sinfo is
    procedure Set_From_Default
      (N : Node_Id; Val : Boolean := True);    -- Flag6
 
+   procedure Set_From_Dynamic_Predicate
+     (N : Node_Id; Val : Boolean := True);    -- Flag7
+
+   procedure Set_From_Static_Predicate
+     (N : Node_Id; Val : Boolean := True);    -- Flag8
+
    procedure Set_Generic_Associations
      (N : Node_Id; Val : List_Id);            -- List3
 
@@ -9275,7 +9424,7 @@ package Sinfo is
      (N : Node_Id; Val : Boolean := True);    -- Flag17
 
    procedure Set_Has_Pragma_CPU
-     (N : Node_Id; Val : Boolean := True);    -- Flag10
+     (N : Node_Id; Val : Boolean := True);    -- Flag14
 
    procedure Set_Has_Pragma_Priority
      (N : Node_Id; Val : Boolean := True);    -- Flag6
@@ -9349,6 +9498,9 @@ package Sinfo is
    procedure Set_Is_Asynchronous_Call_Block
      (N : Node_Id; Val : Boolean := True);    -- Flag7
 
+   procedure Set_Is_Boolean_Aspect
+     (N : Node_Id; Val : Boolean := True);    -- Flag16
+
    procedure Set_Is_Component_Left_Opnd
      (N : Node_Id; Val : Boolean := True);    -- Flag13
 
@@ -9412,6 +9564,9 @@ package Sinfo is
    procedure Set_Iteration_Scheme
      (N : Node_Id; Val : Node_Id);            -- Node2
 
+   procedure Set_Iterator_Specification
+     (N : Node_Id; Val : Node_Id);            -- Node2
+
    procedure Set_Itype
      (N : Node_Id; Val : Entity_Id);          -- Node1
 
@@ -9532,6 +9687,9 @@ package Sinfo is
    procedure Set_Object_Definition
      (N : Node_Id; Val : Node_Id);            -- Node4
 
+   procedure Set_Of_Present
+     (N : Node_Id; Val : Boolean := True);   -- Flag16
+
    procedure Set_Original_Discriminant
      (N : Node_Id; Val : Node_Id);            -- Node2
 
@@ -9709,6 +9867,9 @@ package Sinfo is
    procedure Set_Subtype_Marks
      (N : Node_Id; Val : List_Id);            -- List2
 
+   procedure Set_Suppress_Assignment_Checks
+     (N : Node_Id; Val : Boolean := True);    -- Flag18
+
    procedure Set_Suppress_Loop_Warnings
      (N : Node_Id; Val : Boolean := True);    -- Flag17
 
@@ -9766,6 +9927,9 @@ package Sinfo is
    procedure Set_Visible_Declarations
      (N : Node_Id; Val : List_Id);            -- List2
 
+   procedure Set_Used_Operations
+     (N : Node_Id; Val : Elist_Id);           -- Elist5
+
    procedure Set_Was_Originally_Stub
      (N : Node_Id; Val : Boolean := True);    -- Flag13
 
@@ -10456,6 +10620,13 @@ package Sinfo is
         4 => True,    --  Subtype_Mark (Node4)
         5 => False),  --  Etype (Node5-Sem)
 
+     N_Quantified_Expression =>
+       (1 => True,    --  Condition (Node1)
+        2 => True,    --  Iterator_Specification
+        3 => False,   --  unused
+        4 => True,    --  Loop_Parameter_Specification (Node4)
+        5 => False),  --  Etype (Node5-Sem)
+
      N_Allocator =>
        (1 => False,   --  Storage_Pool (Node1-Sem)
         2 => False,   --  Procedure_To_Call (Node2-Sem)
@@ -10535,7 +10706,7 @@ package Sinfo is
 
      N_Iteration_Scheme =>
        (1 => True,    --  Condition (Node1)
-        2 => False,   --  unused
+        2 => True,    --  Iterator_Specification (Node2)
         3 => False,   --  Condition_Actions (List3-Sem)
         4 => True,    --  Loop_Parameter_Specification (Node4)
         5 => False),  --  unused
@@ -10547,6 +10718,13 @@ package Sinfo is
         4 => True,    --  Discrete_Subtype_Definition (Node4)
         5 => False),  --  unused
 
+     N_Iterator_Specification =>
+       (1 => True,    --  Defining_Identifier (Node1)
+        2 => True,    --  Name (Node2)
+        3 => False,   --  Unused
+        4 => False,   --  Unused
+        5 => True),   --  Subtype_Indication (Node5)
+
      N_Block_Statement =>
        (1 => True,    --  Identifier (Node1)
         2 => True,    --  Declarations (List2)
@@ -10638,7 +10816,7 @@ package Sinfo is
         4 => True,    --  Handled_Statement_Sequence (Node4)
         5 => False),  --  Corresponding_Spec (Node5-Sem)
 
-     N_Parameterized_Expression =>
+     N_Expression_Function =>
        (1 => True,    --  Specification (Node1)
         2 => False,   --  unused
         3 => True,    --  Expression (Node3)
@@ -10984,7 +11162,7 @@ package Sinfo is
      N_Compilation_Unit_Aux =>
        (1 => True,    --  Actions (List1)
         2 => True,    --  Declarations (List2)
-        3 => False,   --  unused
+        3 => False,   --  Default_Storage_Pool (Node3)
         4 => True,    --  Config_Pragmas (List4)
         5 => True),   --  Pragmas_After (List5)
 
@@ -11516,7 +11694,6 @@ package Sinfo is
    pragma Inline (Alternatives);
    pragma Inline (Ancestor_Part);
    pragma Inline (Array_Aggregate);
-   pragma Inline (Aspect_Cancel);
    pragma Inline (Aspect_Rep_Item);
    pragma Inline (Assignment_OK);
    pragma Inline (Associated_Node);
@@ -11566,6 +11743,7 @@ package Sinfo is
    pragma Inline (Debug_Statement);
    pragma Inline (Declarations);
    pragma Inline (Default_Expression);
+   pragma Inline (Default_Storage_Pool);
    pragma Inline (Default_Name);
    pragma Inline (Defining_Identifier);
    pragma Inline (Defining_Unit_Name);
@@ -11630,6 +11808,8 @@ package Sinfo is
    pragma Inline (From_At_End);
    pragma Inline (From_At_Mod);
    pragma Inline (From_Default);
+   pragma Inline (From_Dynamic_Predicate);
+   pragma Inline (From_Static_Predicate);
    pragma Inline (Generic_Associations);
    pragma Inline (Generic_Formal_Declarations);
    pragma Inline (Generic_Parent);
@@ -11665,8 +11845,10 @@ package Sinfo is
    pragma Inline (Inherited_Discriminant);
    pragma Inline (Instance_Spec);
    pragma Inline (Intval);
+   pragma Inline (Iterator_Specification);
    pragma Inline (Is_Accessibility_Actual);
    pragma Inline (Is_Asynchronous_Call_Block);
+   pragma Inline (Is_Boolean_Aspect);
    pragma Inline (Is_Component_Left_Opnd);
    pragma Inline (Is_Component_Right_Opnd);
    pragma Inline (Is_Controlling_Actual);
@@ -11728,6 +11910,7 @@ package Sinfo is
    pragma Inline (Null_Exclusion_In_Return_Present);
    pragma Inline (Null_Record_Present);
    pragma Inline (Object_Definition);
+   pragma Inline (Of_Present);
    pragma Inline (Original_Discriminant);
    pragma Inline (Original_Entity);
    pragma Inline (Others_Discrete_Choices);
@@ -11787,6 +11970,7 @@ package Sinfo is
    pragma Inline (Subtype_Indication);
    pragma Inline (Subtype_Mark);
    pragma Inline (Subtype_Marks);
+   pragma Inline (Suppress_Assignment_Checks);
    pragma Inline (Suppress_Loop_Warnings);
    pragma Inline (Synchronized_Present);
    pragma Inline (Tagged_Present);
@@ -11806,6 +11990,7 @@ package Sinfo is
    pragma Inline (Variant_Part);
    pragma Inline (Variants);
    pragma Inline (Visible_Declarations);
+   pragma Inline (Used_Operations);
    pragma Inline (Was_Originally_Stub);
    pragma Inline (Withed_Body);
    pragma Inline (Zero_Cost_Handling);
@@ -11831,7 +12016,6 @@ package Sinfo is
    pragma Inline (Set_Alternatives);
    pragma Inline (Set_Ancestor_Part);
    pragma Inline (Set_Array_Aggregate);
-   pragma Inline (Set_Aspect_Cancel);
    pragma Inline (Set_Aspect_Rep_Item);
    pragma Inline (Set_Assignment_OK);
    pragma Inline (Set_Associated_Node);
@@ -11881,6 +12065,7 @@ package Sinfo is
    pragma Inline (Set_Debug_Statement);
    pragma Inline (Set_Declarations);
    pragma Inline (Set_Default_Expression);
+   pragma Inline (Set_Default_Storage_Pool);
    pragma Inline (Set_Default_Name);
    pragma Inline (Set_Defining_Identifier);
    pragma Inline (Set_Defining_Unit_Name);
@@ -11944,6 +12129,8 @@ package Sinfo is
    pragma Inline (Set_From_At_End);
    pragma Inline (Set_From_At_Mod);
    pragma Inline (Set_From_Default);
+   pragma Inline (Set_From_Dynamic_Predicate);
+   pragma Inline (Set_From_Static_Predicate);
    pragma Inline (Set_Generic_Associations);
    pragma Inline (Set_Generic_Formal_Declarations);
    pragma Inline (Set_Generic_Parent);
@@ -11978,8 +12165,10 @@ package Sinfo is
    pragma Inline (Set_Inherited_Discriminant);
    pragma Inline (Set_Instance_Spec);
    pragma Inline (Set_Intval);
+   pragma Inline (Set_Iterator_Specification);
    pragma Inline (Set_Is_Accessibility_Actual);
    pragma Inline (Set_Is_Asynchronous_Call_Block);
+   pragma Inline (Set_Is_Boolean_Aspect);
    pragma Inline (Set_Is_Component_Left_Opnd);
    pragma Inline (Set_Is_Component_Right_Opnd);
    pragma Inline (Set_Is_Controlling_Actual);
@@ -12042,6 +12231,7 @@ package Sinfo is
    pragma Inline (Set_Null_Exclusion_In_Return_Present);
    pragma Inline (Set_Null_Record_Present);
    pragma Inline (Set_Object_Definition);
+   pragma Inline (Set_Of_Present);
    pragma Inline (Set_Original_Discriminant);
    pragma Inline (Set_Original_Entity);
    pragma Inline (Set_Others_Discrete_Choices);
@@ -12100,6 +12290,7 @@ package Sinfo is
    pragma Inline (Set_Subtype_Indication);
    pragma Inline (Set_Subtype_Mark);
    pragma Inline (Set_Subtype_Marks);
+   pragma Inline (Set_Suppress_Assignment_Checks);
    pragma Inline (Set_Suppress_Loop_Warnings);
    pragma Inline (Set_Synchronized_Present);
    pragma Inline (Set_Tagged_Present);
@@ -12119,12 +12310,23 @@ package Sinfo is
    pragma Inline (Set_Variant_Part);
    pragma Inline (Set_Variants);
    pragma Inline (Set_Visible_Declarations);
+   pragma Inline (Set_Used_Operations);
    pragma Inline (Set_Was_Originally_Stub);
    pragma Inline (Set_Withed_Body);
    pragma Inline (Set_Zero_Cost_Handling);
 
+   --------------
+   -- Synonyms --
+   --------------
+
+   --  These synonyms are to aid in transition, they should eventually be
+   --  removed when all remaining references to the obsolete name are gone.
+
    N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
    --  Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
    --  should refer to N_Simple_Return_Statement.
 
+   N_Parameterized_Expression : constant Node_Kind := N_Expression_Function;
+   --  Old name for expression functions (used during Ada 2012 transition)
+
 end Sinfo;