From 3393111257f2c11710a7dc704846581a481c0309 Mon Sep 17 00:00:00 2001 From: Javier Miranda Date: Tue, 20 May 2008 14:50:03 +0200 Subject: 2008-05-20 Javier Miranda Ed Schonberg Hristian Kirtchev * sem_ch3.adb (Analyze_Object_Declaration): Fix over-conservative condition restricting use of predefined assignment with tagged types that have convention CPP. (Analyze_Object_Declaration): Relax the check regarding deferred constants declared in scopes other than packages since they can be completed with pragma Import. Add missing escaping of all-caps word 'CPP' in error messages. (Build_Discriminated_Subtype): Do not inherit representation clauses from parent type if subtype already carries them, because they are inherited earlier during derivation and already include those that may come from a partial view. * sem_ch9.adb, sem_ch5.adb, sem_ch6.adb (Analyze_Subprogram_Body): Check the declarations of a subprogram body for proper deferred constant completion. * sem_ch7.ads, sem_ch7.adb (Inspect_Deferred_Constant_Completion): Moved to sem_util. From-SVN: r135638 --- gcc/ada/sem_ch6.adb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/ada/sem_ch6.adb') diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index fbac48cd1af..b4b1dcf9e04 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -1257,10 +1257,10 @@ package body Sem_Ch6 is procedure Analyze_Subprogram_Body (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); + Body_Deleted : constant Boolean := False; Body_Spec : constant Node_Id := Specification (N); Body_Id : Entity_Id := Defining_Entity (Body_Spec); Prev_Id : constant Entity_Id := Current_Entity_In_Scope (Body_Id); - Body_Deleted : constant Boolean := False; Conformant : Boolean; HSS : Node_Id; Missing_Ret : Boolean; @@ -1369,7 +1369,8 @@ package body Sem_Ch6 is Plist : List_Id; function Is_Inline_Pragma (N : Node_Id) return Boolean; - -- Simple predicate, used twice. + -- True when N is a pragma Inline or Inline_Awlays that applies + -- to this subprogram. ----------------------- -- Is_Inline_Pragma -- @@ -2045,6 +2046,7 @@ package body Sem_Ch6 is -- Check completion, and analyze the statements Check_Completion; + Inspect_Deferred_Constant_Completion (Declarations (N)); Analyze (HSS); -- Deal with end of scope processing for the body -- cgit v1.2.1