This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch,Fortran,committed] Fix BIND(C) example in gfortran.texi
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Thu, 19 Nov 2009 09:58:12 +0100
- Subject: [Patch,Fortran,committed] Fix BIND(C) example in gfortran.texi
Committed as obvious:
Sending fortran/ChangeLog
Sending fortran/gfortran.texi
Transmitting file data ..
Committed revision 154326.
Index: gfortran.texi
===================================================================
--- gfortran.texi (revision 154325)
+++ gfortran.texi (working copy)
@@ -2009,9 +2009,10 @@
matches the Fortran declaration
@smallexample
- integer(c_int) func(i,j)
- integer, VALUE :: i
- integer :: j
+ integer(c_int) function func(i,j)
+ use iso_c_binding, only: c_int
+ integer(c_int), VALUE :: i
+ integer(c_int) :: j
@end smallexample
Note that pointer arguments also frequently need the @code{VALUE}
attribute.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 154325)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2009-11-19 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.texi (Interoperable Subroutines and Functions): Fix
+ example.
+
2009-11-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/42072