From ca44152fc58297f5c0bef56190b6968549e1438e Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Tue, 8 Apr 2008 08:55:06 +0200 Subject: sem_aggr.adb (Analyze_N_Extension_Aggregate): Add legality checks for the ancestor part of an extension aggregate for a... 2008-04-08 Ed Schonberg Robert Dewar * sem_aggr.adb (Analyze_N_Extension_Aggregate): Add legality checks for the ancestor part of an extension aggregate for a limited type. (Resolve_Array_Aggregate): Issue warning for sliding of aggregate with enumeration index bounds. (Resolve_Array_Aggregate): Add circuit for diagnosing missing choices when array is too short. (Check_Expr_OK_In_Limited_Aggregate): Move function Check_Non_Limited_Type from Resolve_Record_Aggregate to top level (and change name). (Resolve_Array_Aggregate.Resolve_Aggr_Expr): Check_Expr_OK_In_Limited_Aggregates called to check for illegal limited component associations. (Check_Non_Limited_Type): Moved to outer level and renamed. (Resolve_Record_Aggregate): In an extension aggregate, an association with a box initialization can only designate a component of the extension, not a component inherited from the given ancestor * sem_case.adb: Use new Is_Standard_Character_Type predicate From-SVN: r134049 --- gcc/ada/sem_case.adb | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'gcc/ada/sem_case.adb') diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb index 3f27a4f..d85d797 100644 --- a/gcc/ada/sem_case.adb +++ b/gcc/ada/sem_case.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1996-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2008, 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- -- @@ -268,10 +268,7 @@ package body Sem_Case is -- For character, or wide [wide] character. If 7-bit ASCII graphic -- range, then build and return appropriate character literal name - if Rtp = Standard_Character - or else Rtp = Standard_Wide_Character - or else Rtp = Standard_Wide_Wide_Character - then + if Is_Standard_Character_Type (Ctype) then C := UI_To_Int (Value); if C in 16#20# .. 16#7E# then @@ -425,12 +422,7 @@ package body Sem_Case is -- of literals to search. Instead, a N_Character_Literal node -- is created with the appropriate Char_Code and Chars fields. - if Root_Type (Choice_Type) = Standard_Character - or else - Root_Type (Choice_Type) = Standard_Wide_Character - or else - Root_Type (Choice_Type) = Standard_Wide_Wide_Character - then + if Is_Standard_Character_Type (Choice_Type) then Set_Character_Literal_Name (Char_Code (UI_To_Int (Value))); Lit := New_Node (N_Character_Literal, Loc); Set_Chars (Lit, Name_Find); -- cgit v1.1