diff mbox series

[Ada] Make attribute Update an obsolescent feature

Message ID 20201020072330.GA31477@adacore.com
State New
Headers show
Series [Ada] Make attribute Update an obsolescent feature | expand

Commit Message

Pierre-Marie de Rodat Oct. 20, 2020, 7:23 a.m. UTC
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 mbox series

Patch

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