This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/10036] New: Wide-character support for Fortran is missing


Fortran 2003 allows and Fortran 2008 mandates support for wide-character strings
in Fortran compilers. Those are then of the type "ISO/IEC 10646-1:2000 UCS-4
character type".

To my knowledge, GCC/gfortran 4.4/4.5 is the only Fortran compiler which
supports wide strings so far.

Example program (compile with "gfortran -fbackslash"; use "\u...." and
"\U........" to enter Unicode characters).
-------------------------------------
character(kind=4) :: c
character(kind=4,len=5) :: str
c = 4_'\u00AE'
str = 4_'\u00AE\u01DD'
open(6,encoding='utf-8')
print *, c
print *, str
end
-------------------------------------

Currently, gdb prints:

(gdb) pt c
type = character(kind=4) (1)
(gdb) pt str
type = character(kind=4) (5)
(gdb) p str
$1 = (92, 117, 48, 48, 65)
(gdb) p c
$2 = (92)

(Support for entering, e.g., UTF-8 directly in the source code is planned but
not yet implemented.)

 * * *

The support in gdb should be relatively simple on top of the wide-char support
for C, cf. http://sourceware.org/ml/gdb-patches/2009-01/msg00533.html (I'm not
sure whether that is the latest patch, but it is in the CVS tree.)

-- 
           Summary: Wide-character support for Fortran is missing
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: burnus at gmx dot de
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10036

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]