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: unassig...@gcc.gnu.org ReportedBy: bur...@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