diff options
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r-- | gcc/ada/sem_ch13.adb | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index ce47fd8..fdc3929 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -147,27 +147,6 @@ package body Sem_Ch13 is -- Uint value. If the value is inappropriate, then error messages are -- posted as required, and a value of No_Uint is returned. - procedure Get_Interfacing_Aspects - (Iface_Asp : Node_Id; - Conv_Asp : out Node_Id; - EN_Asp : out Node_Id; - Expo_Asp : out Node_Id; - Imp_Asp : out Node_Id; - LN_Asp : out Node_Id; - Do_Checks : Boolean := False); - -- Given a single interfacing aspect Iface_Asp, retrieve other interfacing - -- aspects that apply to the same related entity. The aspects considered by - -- this routine are as follows: - -- - -- Conv_Asp - aspect Convention - -- EN_Asp - aspect External_Name - -- Expo_Asp - aspect Export - -- Imp_Asp - aspect Import - -- LN_Asp - aspect Link_Name - -- - -- When flag Do_Checks is set, this routine will flag duplicate uses of - -- aspects. - function Is_Operational_Item (N : Node_Id) return Boolean; -- A specification for a stream attribute is allowed before the full type -- is declared, as explained in AI-00137 and the corrigendum. Attributes @@ -11214,106 +11193,6 @@ package body Sem_Ch13 is end if; end Get_Alignment_Value; - ----------------------------- - -- Get_Interfacing_Aspects -- - ----------------------------- - - procedure Get_Interfacing_Aspects - (Iface_Asp : Node_Id; - Conv_Asp : out Node_Id; - EN_Asp : out Node_Id; - Expo_Asp : out Node_Id; - Imp_Asp : out Node_Id; - LN_Asp : out Node_Id; - Do_Checks : Boolean := False) - is - procedure Save_Or_Duplication_Error - (Asp : Node_Id; - To : in out Node_Id); - -- Save the value of aspect Asp in node To. If To already has a value, - -- then this is considered a duplicate use of aspect. Emit an error if - -- flag Do_Checks is set. - - ------------------------------- - -- Save_Or_Duplication_Error -- - ------------------------------- - - procedure Save_Or_Duplication_Error - (Asp : Node_Id; - To : in out Node_Id) - is - begin - -- Detect an extra aspect and issue an error - - if Present (To) then - if Do_Checks then - Error_Msg_Name_1 := Chars (Identifier (Asp)); - Error_Msg_Sloc := Sloc (To); - Error_Msg_N ("aspect % previously given #", Asp); - end if; - - -- Otherwise capture the aspect - - else - To := Asp; - end if; - end Save_Or_Duplication_Error; - - -- Local variables - - Asp : Node_Id; - Asp_Id : Aspect_Id; - - -- The following variables capture each individual aspect - - Conv : Node_Id := Empty; - EN : Node_Id := Empty; - Expo : Node_Id := Empty; - Imp : Node_Id := Empty; - LN : Node_Id := Empty; - - -- Start of processing for Get_Interfacing_Aspects - - begin - -- The input interfacing aspect should reside in an aspect specification - -- list. - - pragma Assert (Is_List_Member (Iface_Asp)); - - -- Examine the aspect specifications of the related entity. Find and - -- capture all interfacing aspects. Detect duplicates and emit errors - -- if applicable. - - Asp := First (List_Containing (Iface_Asp)); - while Present (Asp) loop - Asp_Id := Get_Aspect_Id (Asp); - - if Asp_Id = Aspect_Convention then - Save_Or_Duplication_Error (Asp, Conv); - - elsif Asp_Id = Aspect_External_Name then - Save_Or_Duplication_Error (Asp, EN); - - elsif Asp_Id = Aspect_Export then - Save_Or_Duplication_Error (Asp, Expo); - - elsif Asp_Id = Aspect_Import then - Save_Or_Duplication_Error (Asp, Imp); - - elsif Asp_Id = Aspect_Link_Name then - Save_Or_Duplication_Error (Asp, LN); - end if; - - Next (Asp); - end loop; - - Conv_Asp := Conv; - EN_Asp := EN; - Expo_Asp := Expo; - Imp_Asp := Imp; - LN_Asp := LN; - end Get_Interfacing_Aspects; - ------------------------------------- -- Inherit_Aspects_At_Freeze_Point -- ------------------------------------- |