From fd7215d7119221065b6aeb6ac70e2b75a74a94fb Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 31 Jul 2014 15:31:48 +0200 Subject: [multiple changes] 2014-07-31 Robert Dewar * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor reformatting. 2014-07-31 Hristian Kirtchev * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment which demonstrates the expansion of while loops subject to attribute 'Loop_Entry. The condition of a while loop along with related condition actions is now wrapped in a function. Instead of repeating the condition, the expansion now calls the function. 2014-07-31 Ed Schonberg * sem_case.adb (Check_Against_Predicate): Correct off-by-one error when reporting of missing values in a case statement for a type with a static predicate. (Check_Choices): Reject a choice given by a subtype to which a Dynamic_Predicate applies. * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit Has_Dynamic_Predicate_Aspect flag from parent. 2014-07-31 Ed Schonberg * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate cannot apply to a subtype of an incomplete type. (Is_Static_Choice): Treat an Others_Clause as static. The staticness of the expression and of the range are checked elsewhere. 2014-07-31 Pascal Obry * adaint.h (__gnat_ftell64): Added. (__gnat_fseek64): Added. (__int64): Added. * cstreams.c (__int64): Removed. From-SVN: r213366 --- gcc/ada/sem_case.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sem_case.adb') diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb index 709a264..e00b567 100644 --- a/gcc/ada/sem_case.adb +++ b/gcc/ada/sem_case.adb @@ -433,9 +433,10 @@ package body Sem_Case is Error := True; -- The previous choice covered part of the static predicate set + -- but there is a gap after Prev_Hi. else - Missing_Choice (Prev_Hi, Choice_Lo - 1); + Missing_Choice (Prev_Hi + 1, Choice_Lo - 1); Error := True; end if; end if; @@ -1462,6 +1463,7 @@ package body Sem_Case is if not Is_Discrete_Type (E) or else not Has_Static_Predicate (E) + or else Has_Dynamic_Predicate_Aspect (E) then Bad_Predicated_Subtype_Use ("cannot use subtype& with non-static " -- cgit v1.1