public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/10036] New: Wide-character support for Fortran is missing
@ 2009-04-06 20:18 burnus at gmx dot de
  2009-04-06 20:30 ` [Bug fortran/10036] " jan dot kratochvil at redhat dot com
  2009-04-06 21:20 ` tromey at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: burnus at gmx dot de @ 2009-04-06 20:18 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/10036] Wide-character support for Fortran is missing
  2009-04-06 20:18 [Bug fortran/10036] New: Wide-character support for Fortran is missing burnus at gmx dot de
@ 2009-04-06 20:30 ` jan dot kratochvil at redhat dot com
  2009-04-06 21:20 ` tromey at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-04-06 20:30 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan dot kratochvil at redhat
                   |                            |dot com


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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/10036] Wide-character support for Fortran is missing
  2009-04-06 20:18 [Bug fortran/10036] New: Wide-character support for Fortran is missing burnus at gmx dot de
  2009-04-06 20:30 ` [Bug fortran/10036] " jan dot kratochvil at redhat dot com
@ 2009-04-06 21:20 ` tromey at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: tromey at redhat dot com @ 2009-04-06 21:20 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at redhat dot com


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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-06 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-06 20:18 [Bug fortran/10036] New: Wide-character support for Fortran is missing burnus at gmx dot de
2009-04-06 20:30 ` [Bug fortran/10036] " jan dot kratochvil at redhat dot com
2009-04-06 21:20 ` tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).