diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-09 10:32:50 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-09 10:32:50 +0000 |
commit | a22215d69875c3acc03cece47f318043c171c7da (patch) | |
tree | 29c9bde6be0184567a5d781848146e9b3c6e96b3 /gcc/ada/s-fileio.adb | |
parent | a027cdc7243a3c988f5805e1fb9dc44c05f1175f (diff) | |
download | gcc-a22215d69875c3acc03cece47f318043c171c7da.tar.gz |
2010-09-09 Vincent Celier <celier@adacore.com>
* osint.adb (Canonical_Case_File_Name): Use procedure To_Lower in
System.Case_Util
(Canonical_Case_Env_Var_Name): Ditto
2010-09-09 Bob Duff <duff@adacore.com>
* g-pehage.adb (Allocate): Initialize the allocated elements of IT.
2010-09-09 Robert Dewar <dewar@adacore.com>
* cstand.adb: Mark Boolean and Character types as Ordered
* einfo.adb (Has_Pragma_Ordered): New flag
* einfo.ads (Has_Pragma_Ordered): New flag
* g-calend.ads: Mark Day_Name as Ordered
* opt.ads: Mark Ada_Version_Type as Ordered
(Warn_On_Unordered_Enumeration_Type): New flag
* par-prag.adb: Add procdessing for pragma Ordered
* s-ficobl.ads (Read_File_Mode): New subtype
* s-fileio.adb: Use Read_File_Mode instead of explicit ranges
* s-taskin.ads: Mark Entry_Call_State as ordered
* sem_ch3.adb (Build_Derived_Enumeration_Type): Inherit
Has_Pragma_Ordered.
* sem_ch6.ads: Mark Conformance_Type as Ordered
* sem_prag.adb: Implement pragma Ordered
* sem_res.adb (Bad_Unordered_Enumeration_Reference): New function
(Resolve_Comparison_Op): Diagnose unordered comparison
(Resolve_Range): Diagnose unordered range
* sem_warn.adb (Warn_On_Unordered_Enumeration_Type): New flag (from
-gnatw.u/U)
* snames.ads-tmpl: Add entry for pragma Ordered
* style.ads (Check_Enumeration_Subrange): Removed
* styleg.adb (Check_Enumeration_Subrange): Removed
* styleg.ads (Check_Enumeration_Subrange): Removed
* stylesw.adb: Remove handling of -gnatyE switch
* stylesw.ads: (Style_Check_Enumeration_Subranges): Removed
* vms_data.ads: Remove -gnatyE entries
Add -gnatw.u entries
* ug_words: Entries for -gnatw.u and -gnatw.U
* gnat_ugn.texi: Document -gnatw.u/-gnatw.U switches
* gnat_rm.texi: Document pragma Ordered.
* s-tasren.adb: Avoid unnecessary comparison on unordered enumeration.
* s-tpobop.adb: Remove comparison on unordered enumeration type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164070 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-fileio.adb')
-rw-r--r-- | gcc/ada/s-fileio.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb index 185fc52cff9..2142e49024c 100644 --- a/gcc/ada/s-fileio.adb +++ b/gcc/ada/s-fileio.adb @@ -205,7 +205,7 @@ package body System.File_IO is begin if File = null then raise Status_Error with "file not open"; - elsif File.Mode > Inout_File then + elsif File.Mode not in Read_File_Mode then raise Mode_Error with "file not readable"; end if; end Check_Read_Status; @@ -1183,7 +1183,7 @@ package body System.File_IO is -- reopen. if Mode = File.Mode - and then Mode <= Inout_File + and then Mode in Read_File_Mode then rewind (File.Stream); |