In the new version of Ada, GNAT specific 'Update atttribute is replaced
by delta aggregates. Add a warning on occurrences of 'Update.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * sem_attr.adb (Analyze_Attribute): Emit a warning on 'Update
        when Warn_On_Obsolescent_Feature is set to True.
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -6899,6 +6899,11 @@ package body Sem_Attr is
       --  Start of processing for Update
 
       begin
+         if Warn_On_Obsolescent_Feature then
+            Error_Msg_N ("?j?attribute Update is an obsolescent feature", N);
+            Error_Msg_N ("\?j?use a delta aggregate instead", N);
+         end if;
+
          Check_E1;
 
          if not Is_Object_Reference (P) then


Reply via email to