+2014-07-30 Ed Schonberg <schonberg@adacore.com>
+
+ * a-crdlli.ads: Place declaration of Empty_List after full type
+ declaration for Curosr, to prevent freezing error.
+
+2014-07-30 Robert Dewar <dewar@adacore.com>
+
+ * get_targ.adb: Minor code reorganization.
+ * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
+ reformatting.
+
+2014-07-30 Ed Schonberg <schonberg@adacore.com>
+
+ * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
+ not Program_Error, when attempting to remove an element not in
+ the set. This is the given semantics for all set containers.
+
+2014-07-30 Ed Schonberg <schonberg@adacore.com>
+
+ * a-rbtgbo.adb: -rbtgbo.adb (Delete_Node_Sans_Free): If
+ element is not present in tree return rather than violating
+ an assertion. Constraint_Error will be raised in the caller if
+ element is not in the container.
+
2014-07-30 Arnaud Charlet <charlet@adacore.com>
* set_targ.adb (Read_Target_Dependent_Values): New subprogram.
Insert (Container, New_Item, Position, Inserted);
if not Inserted then
- raise Program_Error with "attempt to insert element already in set";
+ raise Constraint_Error with
+ "attempt to insert element already in set";
end if;
end Insert;
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
Length : Count_Type := 0;
end record;
- Empty_List : constant List := (0, others => <>);
-
type List_Access is access all List;
for List_Access'Storage_Size use 0;
Node : Count_Type := 0;
end record;
+ Empty_List : constant List := (0, others => <>);
+
No_Element : constant Cursor := (null, 0);
end Ada.Containers.Restricted_Doubly_Linked_Lists;
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
X, Y : Count_Type;
Z : constant Count_Type := Node;
- pragma Assert (Z /= 0);
N : Nodes_Type renames Tree.Nodes;
"attempt to tamper with cursors (container is busy)";
end if;
+ -- If node is not present, return. Exception will be raised in caller.
+
+ if Z = 0 then
+ return;
+ end if;
+
pragma Assert (Tree.Length > 0);
pragma Assert (Tree.Root /= 0);
pragma Assert (Tree.First /= 0);
function Digits_From_Size (Size : Pos) return Pos is
begin
- if Size = 32 then
- return 6;
- elsif Size = 48 then
- return 9;
- elsif Size = 64 then
- return 15;
- elsif Size = 96 then
- return 18;
- elsif Size = 128 then
- return 18;
- else
- raise Program_Error;
- end if;
+ case Size is
+ when 32 => return 6;
+ when 48 => return 9;
+ when 64 => return 15;
+ when 96 => return 18;
+ when 128 => return 18;
+ when others => raise Program_Error;
+ end case;
end Digits_From_Size;
-----------------------------
function Width_From_Size (Size : Pos) return Pos is
begin
- if Size = 8 then
- return 4;
- elsif Size = 16 then
- return 6;
- elsif Size = 32 then
- return 11;
- elsif Size = 64 then
- return 21;
- else
- raise Program_Error;
- end if;
+ case Size is
+ when 8 => return 4;
+ when 16 => return 6;
+ when 32 => return 11;
+ when 64 => return 21;
+ when others => raise Program_Error;
+ end case;
end Width_From_Size;
end Get_Targ;
-- Calls the Call_Back function with information for each supported type
function Get_Back_End_Config_File return String_Ptr;
- -- Return the back end configuration file, or null if none.
- -- If non null, this file should be used instead of calling the various
- -- Get_xxx functions in this package.
+ -- Return the back end configuration file, or null if none. If non-null,
+ -- this file should be used instead of calling the various Get_xxx
+ -- functions in this package.
end Get_Targ;
-- --
-- GNAT COMPILER COMPONENTS --
-- --
--- P R J . P R O C --
+-- P R J . P R O C --
-- --
-- B o d y --
-- --
-- Check if the project is already in the tree
Project := No_Project;
+
declare
List : Project_List := In_Tree.Projects;
Path : constant Path_Name_Type :=
-- --
-- GNAT COMPILER COMPONENTS --
-- --
--- P R J . P R O C --
+-- P R J . P R O C --
-- --
-- S p e c --
-- --
--- Copyright (C) 2001-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- in bodies. Limited views of either kind are not allowed
-- if there is no place at which the non-limited view can
-- become available.
+
-- Incomplete formal untagged types are not allowed in
-- subprogram bodies (but are legal in their declarations).