public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/51808] New: Improve handling of ISO_C_BINDING binding names
@ 2012-01-10  9:50 jb at gcc dot gnu.org
  2012-01-13 21:23 ` [Bug fortran/51808] " jb at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jb at gcc dot gnu.org @ 2012-01-10  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51808
           Summary: Improve handling of ISO_C_BINDING binding names
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jb@gcc.gnu.org


Currently in gfc_symbol we have a field binding_label for the bind(C) binding
name. It is a char[] array of size 127. This is suboptimal because

1) For the vast majority of symbols which are not bind(C, name="XXX"), this
wastes memory.

2) It might be too short. Fortran limits the length of names to 63 characters,
but the binding name is not a Fortran identifier. The C standard says that the
implementation should support external identifiers with at least 31 characters,
but an implementation is free to support arbitrarily long identifiers.

Thus, we should get rid of the notion of limited binding label lengths, and use
dynamically allocated storage. 

Also, slightly related, for .mod files a non-empty binding_label field is
needed only if the default name is overridden, saving a bit of space.

If time permits, I'm planning to look into this for the 4.8 cycle.


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

end of thread, other threads:[~2012-01-29 19:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-10  9:50 [Bug fortran/51808] New: Improve handling of ISO_C_BINDING binding names jb at gcc dot gnu.org
2012-01-13 21:23 ` [Bug fortran/51808] " jb at gcc dot gnu.org
2012-01-29 17:36 ` jb at gcc dot gnu.org
2012-01-29 17:43 ` jb at gcc dot gnu.org
2012-01-29 18:28 ` jb at gcc dot gnu.org
2012-01-29 20:52 ` jb at gcc dot gnu.org

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