[Bug ada/43041] New: Default WCEM for opened files is always WCEM_Brackets instead of the -gnatW-specified encoding

2010-02-11 Thread mmarx at wh2 dot tu-dresden dot de
The GNAT Reference Manual (8.6) specifies: `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).'

However, if an empty FORM string is given to Open or Create, the WCEM is always
set to brackets coding, regardless of the encoding method that has been
specified with -gnatW:

Set_WCEM (a-witeio.adb:1632):
`if Start = 0 then
  File.WC_Method := WCEM_Brackets;
else'


from `gcc -v':
`Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.3-2'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--with-arch-32=i486 --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
gcc version 4.4.3 (Debian 4.4.3-2)'


-- 
   Summary: Default WCEM for opened files is always WCEM_Brackets
instead of the -gnatW-specified encoding
   Product: gcc
   Version: 4.4.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mmarx at wh2 dot tu-dresden dot de
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43041



[Bug ada/43041] Default WCEM for opened files is always WCEM_Brackets instead of the -gnatW-specified encoding

2010-02-11 Thread mmarx at wh2 dot tu-dresden dot de


--- Comment #1 from mmarx at wh2 dot tu-dresden dot de  2010-02-11 17:51 
---
Created an attachment (id=19845)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19845action=view)
Expected Output

% gnatmake -f -gnatW8 u8   
gcc-4.4 -c -gnatW8 u8.adb
gnatbind -x u8.ali
gnatlink u8.ali
% ./u8
`[äöü]'
%


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43041



[Bug ada/43041] Default WCEM for opened files is always WCEM_Brackets instead of the -gnatW-specified encoding

2010-02-11 Thread mmarx at wh2 dot tu-dresden dot de


--- Comment #2 from mmarx at wh2 dot tu-dresden dot de  2010-02-11 17:52 
---
Created an attachment (id=19846)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19846action=view)
Constraint_Error because the file is opened with bracket coding

% gnatmake -f -gnatW8 u8_fail
gcc-4.4 -c -gnatW8 u8_fail.adb
gnatbind -x u8_fail.ali
gnatlink u8_fail.ali
% ./u8-fail 

raised CONSTRAINT_ERROR : s-wchcnv.adb:209 explicit raise
%


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43041



[Bug ada/43041] Default WCEM for opened files is always WCEM_Brackets instead of the -gnatW-specified encoding

2010-02-11 Thread mmarx at wh2 dot tu-dresden dot de


--- Comment #3 from mmarx at wh2 dot tu-dresden dot de  2010-02-11 17:52 
---
Created an attachment (id=19847)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19847action=view)
Test file

The test file used to demonstrate the issue.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43041