[PATCH] fix PR ada/80888
Simon Wright
simon@pushface.org
Sat May 27 18:35:00 GMT 2017
The GNAT reference manual says in 11.6 Wide_Text_IO
<https://gcc.gnu.org/onlinedocs/gnat_rm/Wide_005fText_005fIO.html>,
"The default encoding method for the standard files, and for opened
files for which no WCEM parameter is given in the FORM string matches
the wide character encoding specified for the main program (the
default being brackets encoding if no coding method was specified with
-gnatW)."
This is not true; the default is brackets encoding regardless of the
coding method specified with -gnatW.
The attached patch (to 7.1.0) corrects this. Tested on
x86_84-apple-darwin15 by rebuilding the library (cd gcc; make gnatlib
gnatlib-shared) and make -j4 check-ada,
=== acats Summary ===
# of expected passes 2320
# of unexpected failures 0
/Volumes/Miscellaneous/tmp/gcc-7.1.0/gcc/testsuite/ada/acats/run_all.sh completed at Fri 26 May 2017 15:44:52 BST
=== gnat Summary ===
# of expected passes 2569
# of expected failures 24
# of unsupported tests 7
/Volumes/Miscellaneous/tmp/gcc-7.1.0-build/gcc/gnatmake version 7.1.0
gcc/ada/Changelog:
2017-05-27 Simon Wright <simon@pushface.org>
PR ada/80888
* a-textio.adb (Set_WCEM): default the file's wide character encoding
method to Default_WCEM, not WCEM_Brackets.
* a-witeio.adb: likewise.
* a-ztexio.adb: likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wcem-fix.diff
Type: application/octet-stream
Size: 1485 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170527/b46b3f58/attachment.obj>
More information about the Gcc-patches
mailing list