Message ID | 20110804091826.GA5358@adacore.com |
---|---|
State | New |
Headers | show |
Index: sem_attr.adb =================================================================== --- sem_attr.adb (revision 177320) +++ sem_attr.adb (working copy) @@ -4102,9 +4102,15 @@ Analyze_And_Resolve (N, Etype (PS)); else - Error_Attr - ("% attribute can only appear" & - " in function Postcondition pragma", P); + if Ada_Version >= Ada_2012 then + Error_Attr + ("% attribute can only appear" & + " in function Postcondition pragma or Post aspect", P); + else + Error_Attr + ("% attribute can only appear" & + " in function Postcondition pragma", P); + end if; end if; end if; end Result;