From a0a10853345a395b64e44df41dbb743661301ef0 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 12 May 2015 10:21:47 +0200 Subject: [multiple changes] 2015-05-12 Tristan Gingold * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0. 2015-05-12 Ed Schonberg * sem_ch3.adb (Complete_Private_Subtype): Propagate Has_Delayed_Aspects flag from private to full view, to ensure that predicate functions are constructed. 2015-05-12 Ed Schonberg * sem_ch6.adb (Process_Formals): If a tagged formal is an incomplete class-wide type, the subprogram must have a delayed freeze even though the opertation is not a primitive of the type. THis ensures that the backend can recover the full view when elaborating the subprogram declaration. 2015-05-12 Ed Schonberg * exp_util.adb (Get_Current_Value_Condition): Nothing to be done if an elsif part has been rewritten so that it is not part of an enclosing if_statement. From-SVN: r223040 --- gcc/ada/i-cpoint.adb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/ada/i-cpoint.adb') diff --git a/gcc/ada/i-cpoint.adb b/gcc/ada/i-cpoint.adb index 8da412b..ddf33da 100644 --- a/gcc/ada/i-cpoint.adb +++ b/gcc/ada/i-cpoint.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, 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- -- @@ -151,11 +151,12 @@ package body Interfaces.C.Pointers is raise Dereference_Error; end if; - -- Compute array length (including the terminator) + -- Compute array limited length (including the terminator) - L := 1; - while S.all /= Terminator and then L < Limit loop + L := 0; + while L < Limit loop L := L + 1; + exit when S.all = Terminator; Increment (S); end loop; -- cgit v1.1