diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-16 10:13:09 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-16 10:13:09 +0000 |
commit | 45045496865f2eba8258b15e170643edf82cc186 (patch) | |
tree | 369b35340cb5733a90b4f53ab439a3d41140e777 /gcc/ada/s-conca5.adb | |
parent | ed1c90f6f2740f6e0acd2aac2583162a26a5b0a9 (diff) | |
download | gcc-45045496865f2eba8258b15e170643edf82cc186.tar.gz |
2009-04-16 Robert Dewar <dewar@adacore.com>
* Makefile.rtl: Add entries for s-conca?
* debug.adb: Add debug flags -gnatd.c and -gnatd.C to control behavior
of concatenation expansion
* exp_ch4.adb (Expand_Concatenation): Generate calls for certain
string cases instead of expanding assignments inline.
* opt.ads (Optimize_Size): New flag
* s-conca2.ads, s-conca2.adb, s-conca3.adb, s-conca3.ads,
s-conca4.adb, s-conca4.ads, s-conca5.adb, s-conca5.ads, s-conca6.adb,
s-conca6.ads, s-conca7.ads, s-conca7.adb, s-conca8.adb, s-conca8.ads,
s-conca9.adb, s-conca9.ads: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146161 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-conca5.adb')
-rw-r--r-- | gcc/ada/s-conca5.adb | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/gcc/ada/s-conca5.adb b/gcc/ada/s-conca5.adb new file mode 100644 index 00000000000..3aa9e0aa64e --- /dev/null +++ b/gcc/ada/s-conca5.adb @@ -0,0 +1,69 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . C O N C A T _ 5 -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2008-2009, 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/>. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +pragma Warnings (Off); +pragma Compiler_Unit; +pragma Warnings (On); + +package body System.Concat_5 is + + pragma Suppress (All_Checks); + + ------------------ + -- Str_Concat_5 -- + ------------------ + + procedure Str_Concat_5 (R : out String; S1, S2, S3, S4, S5 : String) is + F, L : Natural; + + begin + F := R'First; + L := F + S1'Length - 1; + R (F .. L) := S1; + + F := L + 1; + L := F + S2'Length - 1; + R (F .. L) := S2; + + F := L + 1; + L := F + S3'Length - 1; + R (F .. L) := S3; + + F := L + 1; + L := F + S4'Length - 1; + R (F .. L) := S4; + + F := L + 1; + L := R'Last; + R (F .. L) := S5; + end Str_Concat_5; + +end System.Concat_5; |