diff options
Diffstat (limited to 'gcc/ada/a-direio.adb')
-rw-r--r-- | gcc/ada/a-direio.adb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ada/a-direio.adb b/gcc/ada/a-direio.adb index 3c5743bc439..0c01d1a6d4b 100644 --- a/gcc/ada/a-direio.adb +++ b/gcc/ada/a-direio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2004 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- -- @@ -183,9 +183,15 @@ package body Ada.Direct_IO is -- For a non-constrained variant record type, we read into an -- intermediate buffer, since we may have the case of discriminated -- records where a discriminant check is required, and we may need - -- to assign only part of the record buffer originally written + -- to assign only part of the record buffer originally written. + -- Note: we have to turn warnings on/off because this use of + -- the Constrained attribute is an obsolescent feature. + + pragma Warnings (Off); if not Element_Type'Constrained then + pragma Warnings (On); + declare Buf : Element_Type; @@ -205,7 +211,13 @@ package body Ada.Direct_IO is begin -- Same processing for unconstrained case as above + -- Note: we have to turn warnings on/off because this use of + -- the Constrained attribute is an obsolescent feature. + + pragma Warnings (Off); if not Element_Type'Constrained then + pragma Warnings (On); + declare Buf : Element_Type; |