public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4301] [Ada] Reorder subprogram spec and bodies in alphabetical order
@ 2021-10-11 13:39 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-11 13:39 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:939b3a2ac672ec5792601ef096049302432d4689
commit r12-4301-g939b3a2ac672ec5792601ef096049302432d4689
Author: Etienne Servais <servais@adacore.com>
Date: Thu Sep 30 14:27:34 2021 +0200
[Ada] Reorder subprogram spec and bodies in alphabetical order
gcc/ada/
* sem_ch4.adb (Analyze_Membership_Op): Reorder subprogram spec
and bodies in alphabetical order.
Diff:
---
gcc/ada/sem_ch4.adb | 70 ++++++++++++++++++++++++++---------------------------
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 543ba12f6ed..bf13fb21bd8 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -2956,47 +2956,16 @@ package body Sem_Ch4 is
I_F : Interp_Index;
T_F : Entity_Id;
+ procedure Analyze_Set_Membership;
+ -- If a set of alternatives is present, analyze each and find the
+ -- common type to which they must all resolve.
+
procedure Try_One_Interp (T1 : Entity_Id);
-- Routine to try one proposed interpretation. Note that the context
-- of the operation plays no role in resolving the arguments, so that
-- if there is more than one interpretation of the operands that is
-- compatible with a membership test, the operation is ambiguous.
- --------------------
- -- Try_One_Interp --
- --------------------
-
- procedure Try_One_Interp (T1 : Entity_Id) is
- begin
- if Has_Compatible_Type (R, T1) then
- if Found
- and then Base_Type (T1) /= Base_Type (T_F)
- then
- It := Disambiguate (L, I_F, Index, Any_Type);
-
- if It = No_Interp then
- Ambiguous_Operands (N);
- Set_Etype (L, Any_Type);
- return;
-
- else
- T_F := It.Typ;
- end if;
-
- else
- Found := True;
- T_F := T1;
- I_F := Index;
- end if;
-
- Set_Etype (L, T_F);
- end if;
- end Try_One_Interp;
-
- procedure Analyze_Set_Membership;
- -- If a set of alternatives is present, analyze each and find the
- -- common type to which they must all resolve.
-
----------------------------
-- Analyze_Set_Membership --
----------------------------
@@ -3095,6 +3064,37 @@ package body Sem_Ch4 is
end if;
end Analyze_Set_Membership;
+ --------------------
+ -- Try_One_Interp --
+ --------------------
+
+ procedure Try_One_Interp (T1 : Entity_Id) is
+ begin
+ if Has_Compatible_Type (R, T1) then
+ if Found
+ and then Base_Type (T1) /= Base_Type (T_F)
+ then
+ It := Disambiguate (L, I_F, Index, Any_Type);
+
+ if It = No_Interp then
+ Ambiguous_Operands (N);
+ Set_Etype (L, Any_Type);
+ return;
+
+ else
+ T_F := It.Typ;
+ end if;
+
+ else
+ Found := True;
+ T_F := T1;
+ I_F := Index;
+ end if;
+
+ Set_Etype (L, T_F);
+ end if;
+ end Try_One_Interp;
+
Op : Node_Id;
-- Start of processing for Analyze_Membership_Op
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-11 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 13:39 [gcc r12-4301] [Ada] Reorder subprogram spec and bodies in alphabetical order Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).