From 66371f94f55df849da15ffa9334868de99ac1f8c Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 27 May 2015 15:21:36 +0200 Subject: [multiple changes] 2015-05-27 Ed Schonberg * sem_ch6.adb (Process_Formals): A non-private formal type that is a limited view does not have a list of private dependents. 2015-05-27 Ed Schonberg * exp_ch5.adb (Expand_N_Case_Statement): If the expression in the case statement is a compile-time known value, we look for a corresponding alternative to optimize the case statement into a single case. If the type has a static predicate and the expression does not satisfy the predicate, there is no legal alternative and this optimization is not applicable. Excecution is erroneous, or else if assertions are enabled, an exception will be raised earlier, at the point the expression is elaborated. 2015-05-27 Robert Dewar * sem_elab.adb (Check_Internal_Call_Continue): Suppress warning on Finalize, Adjust, or Initialize if type involved has Warnings_Off set. 2015-05-27 Ed Schonberg * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when applied to a type with no known discriminants. From-SVN: r223752 --- gcc/ada/sem_aux.ads | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/ada/sem_aux.ads') diff --git a/gcc/ada/sem_aux.ads b/gcc/ada/sem_aux.ads index 5268b01..db0931e 100644 --- a/gcc/ada/sem_aux.ads +++ b/gcc/ada/sem_aux.ads @@ -119,9 +119,9 @@ package Sem_Aux is -- First_Entity. The exception arises for tagged types, where the tag -- itself is prepended to the front of the entity chain, so the -- First_Discriminant function steps past the tag if it is present. - -- The caller is responsible for checking that the type has discriminants, - -- so for example it is improper to call this function on a private - -- type with unknown discriminants. + -- The caller is responsible for checking that the type has discriminants. + -- When called on a private type with unknown discriminants, the function + -- always returns Empty. function First_Stored_Discriminant (Typ : Entity_Id) return Entity_Id; -- Typ is a type with discriminants. Gives the first discriminant stored -- cgit v1.1