* sem_ch3.adb (Complete_Private_Subtype): Don't append the private
subtype's list of rep items to the list on the full subtype in the case
where the lists are the same.
2011-08-02 Geert Bosch <bosch@adacore.com>
* switch-c.adb (Free): New deallocation procedure to avoid implicitly
using the one from System.Strings, which also deallocates all strings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177142
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-08-02 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
+ subtype's list of rep items to the list on the full subtype in the case
+ where the lists are the same.
+
+2011-08-02 Geert Bosch <bosch@adacore.com>
+
+ * switch-c.adb (Free): New deallocation procedure to avoid implicitly
+ using the one from System.Strings, which also deallocates all strings.
+
2011-08-02 Geert Bosch <bosch@adacore.com>
* gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
if No (Item) then
Set_First_Rep_Item (Full, First_Rep_Item (Priv));
- -- Else search to end of items currently linked to the full subtype
+ -- Otherwise, search to the end of items currently linked to the full
+ -- subtype and append the private items to the end. However, if Priv
+ -- and Full already have the same list of rep items, then the append
+ -- is not done, as that would create a circularity.
- else
+ elsif Item /= First_Rep_Item (Priv) then
loop
Next_Item := Next_Rep_Item (Item);
exit when No (Next_Item);
with Stylesw; use Stylesw;
with Warnsw; use Warnsw;
+with Ada.Unchecked_Deallocation;
with System.WCh_Con; use System.WCh_Con;
package body Switch.C is
procedure Add_Symbol_Definition (Def : String);
-- Add a symbol definition from the command line
+ procedure Free is
+ new Ada.Unchecked_Deallocation (String_List, String_List_Access);
+ -- Avoid using System.Strings.Free, which also frees the designated strings
+
function Switch_Subsequently_Cancelled
(C : String;
Args : String_List;