public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46020] New: Improve error string for BIND(C) diagnostic for len>1 character return type
@ 2010-10-14 17:08 burnus at gcc dot gnu.org
  2010-10-14 17:15 ` [Bug fortran/46020] " burnus at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-10-14 17:08 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Improve error string for BIND(C) diagnostic for len>1
                    character return type
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


The following is a misleading error message. The return type may be a character
string -- but only of length one!


FUNCTION F_X(A) bind(c,name='F_X')
1
Error: Return type of BIND(C) function 'f_x' at (1) cannot be a character
string

Example (taken from:
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/ee444a5894644f72#)

FUNCTION F_X(A) bind(c,name='F_X')
   CHARACTER*(*) F_X
END FUNCTION


NAG prints:
  Error: BIND(C) function F_X has assumed CHARACTER length
though the error for "CHARACTER(len=4)" is also not that helpful:
  Error: BIND(C) function F_X has CHARACTER(LEN=4)


Maybe one can keep the current string and only add "with length > 1", i.e.

Error: Return type of BIND(C) function 'f_x' at (1) cannot be a character
string with length > 1


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

end of thread, other threads:[~2014-03-22 19:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-14 17:08 [Bug fortran/46020] New: Improve error string for BIND(C) diagnostic for len>1 character return type burnus at gcc dot gnu.org
2010-10-14 17:15 ` [Bug fortran/46020] " burnus at gcc dot gnu.org
2010-11-26  5:00 ` aoliva at gcc dot gnu.org
2010-11-26  5:50 ` aoliva at gcc dot gnu.org
2010-12-06 12:55 ` aoliva at gcc dot gnu.org
2010-12-06 13:04 ` aoliva at gcc dot gnu.org
2010-12-06 13:12 ` aoliva at gcc dot gnu.org
2010-12-06 13:40 ` burnus at gcc dot gnu.org
2014-03-22 19:43 ` 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).