diff options
author | Ed Schonberg <schonberg@adacore.com> | 2008-04-08 08:55:06 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-04-08 08:55:06 +0200 |
commit | ca44152fc58297f5c0bef56190b6968549e1438e (patch) | |
tree | 8558caa298fd9fd8a83a4440596ce4716e5405de /gcc/ada/sem_case.adb | |
parent | f89b7956cbaad5bb0e7f84c1a44b49a88080b99c (diff) | |
download | gcc-ca44152fc58297f5c0bef56190b6968549e1438e.tar.gz |
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 <schonberg@adacore.com>
Robert Dewar <dewar@adacore.com>
* 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
Diffstat (limited to 'gcc/ada/sem_case.adb')
-rw-r--r-- | gcc/ada/sem_case.adb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb index 3f27a4f1e7b..d85d7970b88 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); |