This patch modifies the analysis of aspect specifications to continue the analysis after encountering an illegal aspect Part_Of.
------------ -- Source -- ------------ -- po_t.ads package PO_T is protected Prot_Typ is function Get return Integer; entry Set (X : Integer); private Condition : Boolean := True with Part_Of => Prot_Typ; end Prot_Typ; end PO_T; -- po_t.adb package body PO_T is protected body Prot_Typ is function Get return Integer is begin return 0; end Get; entry Set (X : Integer) when Condition is begin null; end Set; end Prot_Typ; end PO_T; ---------------------------- -- Compilation and Output -- ---------------------------- $ gcc -c po_t.adb po_t.ads:8:14: aspect "Part_Of" must apply to package instantiation, object, single protected type or single task type Tested on x86_64-pc-linux-gnu, committed on trunk 2015-11-13 Hristian Kirtchev <kirtc...@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Continue the analysis after encountering an illegal aspect Part_Of.
Index: sem_ch13.adb =================================================================== --- sem_ch13.adb (revision 230301) +++ sem_ch13.adb (working copy) @@ -2673,7 +2673,6 @@ Decorate (Aspect, Aitem); Insert_Pragma (Aitem); - goto Continue; else Error_Msg_NE @@ -2682,6 +2681,8 @@ Aspect, Id); end if; + goto Continue; + -- SPARK_Mode when Aspect_SPARK_Mode =>