diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-04 13:45:01 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-04 13:45:01 +0000 |
commit | 4282d34207e329ab5c6fcf67aa22a54ed0cce433 (patch) | |
tree | 1ed84f104093c2e1fdc9849a02ea2ea880616996 /gcc/ada/a-cogeso.ads | |
parent | 55d150bb5453950765de8fbc4ce7e6fefffac50d (diff) | |
download | gcc-4282d34207e329ab5c6fcf67aa22a54ed0cce433.tar.gz |
2011-11-04 Yannick Moy <moy@adacore.com>
* atree.adb, atree.ads (Set_Original_Node): New set procedure.
* sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
In ASIS mode, no splitting of aspects between conjuncts.
(Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
expressions refer to the original aspect expressions through
the Original_Node link. This is used in semantic analysis for
ASIS mode, so that the original expression also gets analyzed.
* sem_prag.adb (Preanalyze_TC_Args,
Check_Precondition_Postcondition,
Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
generated from a source aspect, also analyze the original aspect
expression.
(Check_Expr_Is_Static_Expression): New procedure
similar to existing procedure Check_Arg_Is_Static_Expression,
except called on expression inside pragma.
2011-11-04 Tristan Gingold <gingold@adacore.com>
* prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
Find_Project.Try_Path_Name.
(Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
* s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
2011-11-04 Pascal Obry <obry@adacore.com>
* projects.texi: Add short description for qualifiers aggregate
and aggregate library.
2011-11-04 Matthew Heaney <heaney@adacore.com>
* Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
* a-cgaaso.adb: Replaced implementation with instantiation
of Generic_Sort.
* a-cogeso.ad[sb] This is the new Ada 2012 unit
Ada.Containers.Generic_Sort
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180948 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-cogeso.ads')
-rw-r--r-- | gcc/ada/a-cogeso.ads | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/ada/a-cogeso.ads b/gcc/ada/a-cogeso.ads new file mode 100644 index 00000000000..ebf805ab79f --- /dev/null +++ b/gcc/ada/a-cogeso.ads @@ -0,0 +1,40 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT LIBRARY COMPONENTS -- +-- -- +-- ADA.CONTAINERS.GENERIC_SORT -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2011, 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- -- +-- ware Foundation; either version 3, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. -- +-- -- +-- As a special exception under Section 7 of GPL version 3, you are granted -- +-- additional permissions described in the GCC Runtime Library Exception, -- +-- version 3.1, as published by the Free Software Foundation. -- +-- -- +-- You should have received a copy of the GNU General Public License and -- +-- a copy of the GCC Runtime Library Exception along with this program; -- +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +-- <http://www.gnu.org/licenses/>. -- +-- -- +-- This unit was originally developed by Matthew J Heaney. -- +------------------------------------------------------------------------------ + +-- Allows an anonymous array (or array-like container) to be sorted. Generic +-- formal Before returns the result of comparing the elements designated by +-- the indexes, and generic formal Swap exchanges the designated elements. + +generic + type Index_Type is (<>); + with function Before (Left, Right : Index_Type) return Boolean; + with procedure Swap (Left, Right : Index_Type); + +procedure Ada.Containers.Generic_Sort (First, Last : Index_Type'Base); +pragma Pure (Ada.Containers.Generic_Sort); |