gfortran.texi (Interoperable Subroutines and Functions): Fix example.
authorTobias Burnus <burnus@net-b.de>
Thu, 19 Nov 2009 08:57:02 +0000 (09:57 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Thu, 19 Nov 2009 08:57:02 +0000 (09:57 +0100)
2009-11-19  Tobias Burnus  <burnus@net-b.de>

       * gfortran.texi (Interoperable Subroutines and Functions): Fix
       example.

From-SVN: r154326

gcc/fortran/ChangeLog
gcc/fortran/gfortran.texi

index e1f72a12f98d8b58a5bd9c0414bee8ae21110d04..fc0a033568414cf63b2d69745f8c276903c1ebbf 100644 (file)
@@ -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
index c4992ef2bceda208d86e144b241ea6bbbf031bc0..1430c8a658e556b129f413553e9c8eac4cc1aa33 100644 (file)
@@ -2009,9 +2009,10 @@ Thus the following C prototype
 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.