diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-08 06:55:06 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-08 06:55:06 +0000 |
commit | d51a2daf0e46f49150d1d9a4dca3859ef20a1a6b (patch) | |
tree | 8558caa298fd9fd8a83a4440596ce4716e5405de /gcc/ada/sem_case.adb | |
parent | 0f9e949361a50f3f6cf063f38d0f91a8564106ae (diff) | |
download | gcc-d51a2daf0e46f49150d1d9a4dca3859ef20a1a6b.tar.gz |
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
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134049 138bc75d-0d04-0410-961f-82ee72b054a4
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); |