sem_aggr.adb (Resolve_Record_Aggregate): An others association with a box need not...
authorEd Schonberg <schonberg@adacore.com>
Wed, 12 Sep 2007 11:58:40 +0000 (13:58 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 12 Sep 2007 11:58:40 +0000 (13:58 +0200)
2007-09-12  Ed Schonberg  <schonberg@adacore.com>

* sem_aggr.adb (Resolve_Record_Aggregate): An others association with
a box need not correspond to any component.

From-SVN: r128427

gcc/ada/sem_aggr.adb

index 6c52b9f763b472c538bae9ba2450b333012a045a..55385e4c16d381a8010cc18a9b789f08e22b7ea6 100644 (file)
@@ -2665,6 +2665,13 @@ package body Sem_Aggr is
                      Error_Msg_N ("OTHERS must appear last in an aggregate",
                                   Selector_Name);
                      return;
+
+                  --  (Ada2005): If this is an association with a box,
+                  --  indicate that the association need not represent
+                  --  any component.
+
+                  elsif Box_Present (Assoc) then
+                     Others_Box := True;
                   end if;
 
                else