aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-31 11:37:54 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-31 11:37:54 +0200
commit702d2020441d58a06cd7b161483d9c099e56c72b (patch)
tree87048b5ff4d217dd7e8fcd9e17b9a880972dc532 /gcc/ada/sem_ch12.adb
parent67645bdee6a5c57b2ce51bbafbb69cf510ebf189 (diff)
downloadgcc-702d2020441d58a06cd7b161483d9c099e56c72b.zip
gcc-702d2020441d58a06cd7b161483d9c099e56c72b.tar.gz
gcc-702d2020441d58a06cd7b161483d9c099e56c72b.tar.bz2
[multiple changes]
2011-08-31 Jose Ruiz <ruiz@adacore.com> * 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 <quinot@adacore.com> * exp_ch4.adb: Minor reformatting. 2011-08-31 Bob Duff <duff@adacore.com> * 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 <duff@adacore.com> * 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 <obry@adacore.com> * 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 <obry@adacore.com> * prj-conf.adb: Minor reformatting. From-SVN: r178372
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb28
1 files changed, 18 insertions, 10 deletions
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)