[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
This commit is contained in:
Arnaud Charlet 2011-08-02 15:02:09 +02:00
parent 002bdd685c
commit b715bc599a
3 changed files with 21 additions and 2 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;