comparison gcc/ada/libgnat/a-ciorma.adb @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
4 -- -- 4 -- --
5 -- ADA.CONTAINERS.INDEFINITE_ORDERED_MAPS -- 5 -- ADA.CONTAINERS.INDEFINITE_ORDERED_MAPS --
6 -- -- 6 -- --
7 -- B o d y -- 7 -- B o d y --
8 -- -- 8 -- --
9 -- Copyright (C) 2004-2017, Free Software Foundation, Inc. -- 9 -- Copyright (C) 2004-2018, Free Software Foundation, Inc. --
10 -- -- 10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under -- 11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- -- 12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- 13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
539 if Checks and then Position.Node.Element = null then 539 if Checks and then Position.Node.Element = null then
540 raise Program_Error with 540 raise Program_Error with
541 "Position cursor of function Element is bad"; 541 "Position cursor of function Element is bad";
542 end if; 542 end if;
543 543
544 if Checks
545 and then (Left (Position.Node) = Position.Node
546 or else
547 Right (Position.Node) = Position.Node)
548 then
549 raise Program_Error with "dangling cursor";
550 end if;
551
544 pragma Assert (Vet (Position.Container.Tree, Position.Node), 552 pragma Assert (Vet (Position.Container.Tree, Position.Node),
545 "Position cursor of function Element is bad"); 553 "Position cursor of function Element is bad");
546 554
547 return Position.Node.Element.all; 555 return Position.Node.Element.all;
548 end Element; 556 end Element;