From 702d2020441d58a06cd7b161483d9c099e56c72b Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 31 Aug 2011 11:37:54 +0200 Subject: [multiple changes] 2011-08-31 Jose Ruiz * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned to any dispatching domain. 2011-08-31 Thomas Quinot * exp_ch4.adb: Minor reformatting. 2011-08-31 Bob Duff * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication on nodes for which it is not defined. (Is_Non_Overriding_Operation): Exit the loop when we find a generic parent type. 2011-08-31 Bob Duff * sem_ch3.adb (Process_Full_View): Disable legality check if In_Instance, to avoid spurious errors. * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check if In_Instance, to avoid spurious errors. 2011-08-31 Pascal Obry * a-direct.adb: Use Dir_Seps everywhere to properly handle all directory speparators. (Compose): Use Dir_Seps to handle both forms. (Create_Path): Use Dir_Seps instead of explicit check, no semantic changes. (Extension): Use Dir_Seps to handle both forms. 2011-08-31 Pascal Obry * prj-conf.adb: Minor reformatting. From-SVN: r178372 --- gcc/ada/sem_ch12.adb | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'gcc/ada/sem_ch12.adb') diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index d759def..af9555d 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -10418,11 +10418,15 @@ package body Sem_Ch12 is and then not Is_Limited_Type (A_Gen_T) and then Ada_Version >= Ada_2012 then - Error_Msg_NE - ("actual for non-limited & cannot be a limited type", Actual, - Gen_T); - Explain_Limited_Type (Act_T, Actual); - Abandon_Instantiation (Actual); + if In_Instance then + null; + else + Error_Msg_NE + ("actual for non-limited & cannot be a limited type", Actual, + Gen_T); + Explain_Limited_Type (Act_T, Actual); + Abandon_Instantiation (Actual); + end if; end if; end Validate_Derived_Type_Instance; @@ -10556,11 +10560,15 @@ package body Sem_Ch12 is if Is_Limited_Type (Act_T) and then not Is_Limited_Type (A_Gen_T) then - Error_Msg_NE - ("actual for non-limited & cannot be a limited type", Actual, - Gen_T); - Explain_Limited_Type (Act_T, Actual); - Abandon_Instantiation (Actual); + if In_Instance then + null; + else + Error_Msg_NE + ("actual for non-limited & cannot be a limited type", Actual, + Gen_T); + Explain_Limited_Type (Act_T, Actual); + Abandon_Instantiation (Actual); + end if; elsif Known_To_Have_Preelab_Init (A_Gen_T) and then not Has_Preelaborable_Initialization (Act_T) -- cgit v1.1