public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/56149] New: 64 bit gFortran-C interop hidden character argument length passed as 32 bit value
@ 2013-01-30 14:04 paul.laidler at ntlworld dot com
  2013-01-30 16:23 ` [Bug fortran/56149] " kargl at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: paul.laidler at ntlworld dot com @ 2013-01-30 14:04 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56149
           Summary: 64 bit gFortran-C interop hidden character argument
                    length passed as 32 bit value
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: paul.laidler@ntlworld.com


This is not so much a bug but a significant gFortran limitation in my project
to port ClearWin+ to gFortran. Users will not want to edit all their "printf"
calls so that format strings become null terminated. This could be avoided if
the format string length where passed as a 64 bit integer. At the moment
gFortran passes a 32 bit value and allows garbage to remain in the HIDWORD so
the argument cannot safely be distinguished from a 64 bit address.

It would appear that there is no advantage in passing a 32 bit value in this
context.

As an aside, I would also suggest that interop programming would be much
simpler if literal character strings were stored in memory as null-terminated
strings.


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

end of thread, other threads:[~2015-10-09 13:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-30 14:04 [Bug fortran/56149] New: 64 bit gFortran-C interop hidden character argument length passed as 32 bit value paul.laidler at ntlworld dot com
2013-01-30 16:23 ` [Bug fortran/56149] " kargl at gcc dot gnu.org
2013-01-30 19:58 ` paul.laidler at ntlworld dot com
2013-01-30 22:06 ` burnus at gcc dot gnu.org
2013-01-31  8:32 ` paul.laidler at ntlworld dot com
2013-01-31 15:55 ` sgk at troutmask dot apl.washington.edu
2013-01-31 16:30 ` paul.laidler at ntlworld dot com
2013-02-01  5:22 ` sgk at troutmask dot apl.washington.edu
2013-11-25  1:00 ` kargl at gcc dot gnu.org
2015-10-09 13:34 ` dominiq at lps dot ens.fr

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).