re PR ada/80888 (Wide_Text_IO defaults to bracket encoding even if -gnatW8 specified)
authorBob Duff <duff@adacore.com>
Fri, 8 Sep 2017 09:38:38 +0000 (11:38 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 8 Sep 2017 09:38:38 +0000 (11:38 +0200)
2017-09-08  Bob Duff  <duff@adacore.com>

PR ada/80888
* a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
Default_WCEM by default (i.e. if the encoding is not specified
by the Form string).

From-SVN: r251874

gcc/ada/a-textio.adb
gcc/ada/a-witeio.adb
gcc/ada/a-ztexio.adb

index f9219e3..0f842a0 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2016, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2017, 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- --
@@ -1810,11 +1810,10 @@ package body Ada.Text_IO is
       Stop  : Natural;
 
    begin
-      File.WC_Method := WCEM_Brackets;
       FIO.Form_Parameter (File.Form.all, "wcem", Start, Stop);
 
       if Start = 0 then
-         File.WC_Method := WCEM_Brackets;
+         File.WC_Method := Default_WCEM;
 
       else
          if Stop = Start then
index 59e06e2..aadc5ee 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2014, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2017, 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- --
@@ -1652,11 +1652,10 @@ package body Ada.Wide_Text_IO is
       Stop  : Natural;
 
    begin
-      File.WC_Method := WCEM_Brackets;
       FIO.Form_Parameter (File.Form.all, "wcem", Start, Stop);
 
       if Start = 0 then
-         File.WC_Method := WCEM_Brackets;
+         File.WC_Method := Default_WCEM;
 
       else
          if Stop = Start then
index 6102942..39fd38a 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2014, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2017, 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- --
@@ -1626,11 +1626,10 @@ package body Ada.Wide_Wide_Text_IO is
       Stop  : Natural;
 
    begin
-      File.WC_Method := WCEM_Brackets;
       FIO.Form_Parameter (File.Form.all, "wcem", Start, Stop);
 
       if Start = 0 then
-         File.WC_Method := WCEM_Brackets;
+         File.WC_Method := Default_WCEM;
 
       else
          if Stop = Start then