diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 15:02:09 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 15:02:09 +0200 |
commit | b715bc599a55f42755101f1976a9c599308f27f9 (patch) | |
tree | 0794f8a1ad59378b34751b72f4f664705ecc3625 /gcc | |
parent | 002bdd685cc819e9a1609c97d5f2281f6109b297 (diff) | |
download | gcc-b715bc599a55f42755101f1976a9c599308f27f9.zip gcc-b715bc599a55f42755101f1976a9c599308f27f9.tar.gz gcc-b715bc599a55f42755101f1976a9c599308f27f9.tar.bz2 |
[multiple changes]
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.
From-SVN: r177142
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 7 | ||||
-rw-r--r-- | gcc/ada/switch-c.adb | 5 |
3 files changed, 21 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d249de0..7495e77 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +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 diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 3656328..30fb878 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -10167,9 +10167,12 @@ package body Sem_Ch3 is 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); diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index bda476b..177f536 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -35,6 +35,7 @@ with Validsw; use Validsw; 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 @@ -45,6 +46,10 @@ 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; |