From de506f1b9507659678aca32f798edbfe72894bde Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 5 Sep 2005 07:52:38 +0000 Subject: [PATCH] 2005-09-01 Robert Dewar * a-ztexio.adb, a-textio.adb, a-witeio.adb: Replace bad range checks with 'Valid tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103858 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/a-textio.adb | 12 ++++++------ gcc/ada/a-witeio.adb | 12 ++++++------ gcc/ada/a-ztexio.adb | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gcc/ada/a-textio.adb b/gcc/ada/a-textio.adb index d86e2a9..dfd6557 100644 --- a/gcc/ada/a-textio.adb +++ b/gcc/ada/a-textio.adb @@ -896,7 +896,7 @@ package body Ada.Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if Spacing not in Positive_Count then + if not Spacing'Valid then raise Constraint_Error; end if; @@ -1334,7 +1334,7 @@ package body Ada.Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Positive_Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1461,7 +1461,7 @@ package body Ada.Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Positive_Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1506,7 +1506,7 @@ package body Ada.Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1539,7 +1539,7 @@ package body Ada.Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1567,7 +1567,7 @@ package body Ada.Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if Spacing not in Positive_Count then + if not Spacing'Valid then raise Constraint_Error; end if; diff --git a/gcc/ada/a-witeio.adb b/gcc/ada/a-witeio.adb index 249c2bf..0733192 100644 --- a/gcc/ada/a-witeio.adb +++ b/gcc/ada/a-witeio.adb @@ -987,7 +987,7 @@ package body Ada.Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if Spacing not in Positive_Count then + if not Spacing'Valid then raise Constraint_Error; end if; @@ -1346,7 +1346,7 @@ package body Ada.Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Positive_Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1434,7 +1434,7 @@ package body Ada.Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Positive_Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1479,7 +1479,7 @@ package body Ada.Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1512,7 +1512,7 @@ package body Ada.Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1570,7 +1570,7 @@ package body Ada.Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if Spacing not in Positive_Count then + if not Spacing'Valid then raise Constraint_Error; end if; diff --git a/gcc/ada/a-ztexio.adb b/gcc/ada/a-ztexio.adb index bc9acaa..8530e5a 100644 --- a/gcc/ada/a-ztexio.adb +++ b/gcc/ada/a-ztexio.adb @@ -988,7 +988,7 @@ package body Ada.Wide_Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if Spacing not in Positive_Count then + if not Spacing'Valid then raise Constraint_Error; end if; @@ -1348,7 +1348,7 @@ package body Ada.Wide_Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Positive_Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1436,7 +1436,7 @@ package body Ada.Wide_Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Positive_Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1481,7 +1481,7 @@ package body Ada.Wide_Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1514,7 +1514,7 @@ package body Ada.Wide_Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if To not in Count then + if not To'Valid then raise Constraint_Error; end if; @@ -1572,7 +1572,7 @@ package body Ada.Wide_Wide_Text_IO is -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. - if Spacing not in Positive_Count then + if not Spacing'Valid then raise Constraint_Error; end if; -- 2.7.4