diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-10-13 14:54:42 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-10-13 14:54:42 +0200 |
commit | 5dc203d228f3bafc063278e4b6ef7954300b3908 (patch) | |
tree | fa92f8d930db55b708a519f95013bf6c71ed1f8c /gcc/ada/sem_res.ads | |
parent | 3396fcc095e2ee8f247af414aeb448c15bf88f28 (diff) | |
download | gcc-5dc203d228f3bafc063278e4b6ef7954300b3908.zip gcc-5dc203d228f3bafc063278e4b6ef7954300b3908.tar.gz gcc-5dc203d228f3bafc063278e4b6ef7954300b3908.tar.bz2 |
[multiple changes]
2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch10.adb (Entity_Needs_Body): A generic
subprogram renaming needs a body if the renamed unit is declared
outside the current compilation unit.
2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
* sinfo.ads, sem_ch12.adb, sem.adb, expander.adb, sem_res.ads,
sem_ch4.adb, sem_ch8.adb, s-memory.adb: Minor reformatting.
2016-10-13 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: Delete all temporary files when invoked as gnat
list -V -P ...
2016-10-13 Ed Falis <falis@adacore.com>
* impunit.adb: add i-vxinco.ads.
* s-interr-vxworks.adb: add hook for user interrupt connection routine.
From-SVN: r241112
Diffstat (limited to 'gcc/ada/sem_res.ads')
-rw-r--r-- | gcc/ada/sem_res.ads | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/gcc/ada/sem_res.ads b/gcc/ada/sem_res.ads index e94c36b..0fd9f8d 100644 --- a/gcc/ada/sem_res.ads +++ b/gcc/ada/sem_res.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2016, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -47,34 +47,12 @@ package Sem_Res is -- Resolve routines also complete the semantic analysis, and call the -- expander for possible expansion of the completely type resolved node. - procedure Resolve (N : Node_Id; Typ : Entity_Id); - procedure Resolve (N : Node_Id; Typ : Entity_Id; Suppress : Check_Id); - -- Top level type-checking procedure, called in a complete context. The - -- construct N, which is a subexpression, has already been analyzed, and - -- is required to be of type Typ given the analysis of the context (which - -- uses the information gathered on the bottom up phase in Analyze). The - -- resolve routines do various other processing, e.g. static evaluation. - -- If a Suppress argument is present, then the resolution is done with the - -- specified check suppressed (can be All_Checks to suppress all checks). - - procedure Resolve (N : Node_Id); - -- A version of Resolve where the type to be used for resolution is - -- taken from the Etype (N). This is commonly used in cases where the - -- context does not add anything and the first pass of analysis found - -- the correct expected type. - - procedure Resolve_Discrete_Subtype_Indication - (N : Node_Id; - Typ : Entity_Id); - -- Resolve subtype indications in choices (case statements and - -- aggregates) and in index constraints. Note that the resulting Etype - -- of the subtype indication node is set to the Etype of the contained - -- range (i.e. an Itype is not constructed for the actual subtype). - - procedure Resolve_Entry (Entry_Name : Node_Id); - -- Find name of entry being called, and resolve prefix of name with its - -- own type. For now we assume that the prefix cannot be overloaded and - -- the name of the entry plays no role in the resolution. + procedure Ambiguous_Character (C : Node_Id); + -- Give list of candidate interpretations when a character literal cannot + -- be resolved, for example in a (useless) comparison such as 'A' = 'B'. + -- In Ada 95 the literals in question can be of type Character or Wide_ + -- Character. In Ada 2005 Wide_Wide_Character is also a candidate. The + -- node may also be overloaded with user-defined character types. procedure Analyze_And_Resolve (N : Node_Id); procedure Analyze_And_Resolve (N : Node_Id; Typ : Entity_Id); @@ -92,36 +70,58 @@ package Sem_Res is -- is not present, then the Etype of the expression after the Analyze -- call is used for the Resolve. - procedure Ambiguous_Character (C : Node_Id); - -- Give list of candidate interpretations when a character literal cannot - -- be resolved, for example in a (useless) comparison such as 'A' = 'B'. - -- In Ada 95 the literals in question can be of type Character or Wide_ - -- Character. In Ada 2005 Wide_Wide_Character is also a candidate. The - -- node may also be overloaded with user-defined character types. - procedure Check_Parameterless_Call (N : Node_Id); - -- Several forms of names can denote calls to entities without para- - -- meters. The context determines whether the name denotes the entity - -- or a call to it. When it is a call, the node must be rebuilt - -- accordingly and reanalyzed to obtain possible interpretations. + -- Several forms of names can denote calls to entities without parameters. + -- The context determines whether the name denotes the entity or a call to + -- it. When it is a call, the node must be rebuilt accordingly and + -- reanalyzed to obtain possible interpretations. -- -- The name may be that of an overloadable construct, or it can be an -- explicit dereference of a prefix that denotes an access to subprogram. -- In that case, we want to convert the name into a call only if the - -- context requires the return type of the subprogram. Finally, a + -- context requires the return type of the subprogram. Finally, a -- parameterless protected subprogram appears as a selected component. -- -- The parameter T is the Typ for the corresponding resolve call. procedure Preanalyze_And_Resolve (N : Node_Id; T : Entity_Id); - -- Performs a pre-analysis of expression node N. During pre-analysis, - -- N is analyzed and then resolved against type T, but no expansion - -- is carried out for N or its children. For more info on pre-analysis - -- read the spec of Sem. + -- Performs a pre-analysis of expression node N. During pre-analysis, N is + -- analyzed and then resolved against type T, but no expansion is carried + -- out for N or its children. For more info on pre-analysis read the spec + -- of Sem. procedure Preanalyze_And_Resolve (N : Node_Id); -- Same, but use type of node because context does not impose a single type + procedure Resolve (N : Node_Id; Typ : Entity_Id); + procedure Resolve (N : Node_Id; Typ : Entity_Id; Suppress : Check_Id); + -- Top-level type-checking procedure, called in a complete context. The + -- construct N, which is a subexpression, has already been analyzed, and + -- is required to be of type Typ given the analysis of the context (which + -- uses the information gathered on the bottom-up phase in Analyze). The + -- resolve routines do various other processing, e.g. static evaluation. + -- If a Suppress argument is present, then the resolution is done with the + -- specified check suppressed (can be All_Checks to suppress all checks). + + procedure Resolve (N : Node_Id); + -- A version of Resolve where the type to be used for resolution is taken + -- from the Etype (N). This is commonly used in cases where the context + -- does not add anything and the first pass of analysis found the correct + -- expected type. + + procedure Resolve_Discrete_Subtype_Indication + (N : Node_Id; + Typ : Entity_Id); + -- Resolve subtype indications in choices (case statements and aggregates) + -- and in index constraints. Note that the resulting Etype of the subtype_ + -- indication node is set to the Etype of the contained range (i.e. an + -- Itype is not constructed for the actual subtype). + + procedure Resolve_Entry (Entry_Name : Node_Id); + -- Find name of entry being called, and resolve prefix of name with its + -- own type. For now we assume that the prefix cannot be overloaded and + -- the name of the entry plays no role in the resolution. + function Valid_Conversion (N : Node_Id; Target : Entity_Id; @@ -137,7 +137,7 @@ package Sem_Res is private procedure Resolve_Implicit_Type (N : Node_Id) renames Resolve; pragma Inline (Resolve_Implicit_Type); - -- We use this renaming to make the application of Inline very explicit - -- to this version, since other versions of Resolve are not inlined. + -- We use this renaming to make the application of Inline very explicit to + -- this version, since other versions of Resolve are not inlined. end Sem_Res; |