aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2009-11-19 09:57:02 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2009-11-19 09:57:02 +0100
commitdae5882f9ce598ed5c3adb89e21989f41b547bbd (patch)
treee00f38bf10f27b7f04e1aed398e6b9e9378fa3f1 /gcc
parent87af78d462a57ed24e57a87e978cd0820748b236 (diff)
downloadgcc-dae5882f9ce598ed5c3adb89e21989f41b547bbd.zip
gcc-dae5882f9ce598ed5c3adb89e21989f41b547bbd.tar.gz
gcc-dae5882f9ce598ed5c3adb89e21989f41b547bbd.tar.bz2
gfortran.texi (Interoperable Subroutines and Functions): Fix example.
2009-11-19 Tobias Burnus <burnus@net-b.de> * gfortran.texi (Interoperable Subroutines and Functions): Fix example. From-SVN: r154326
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/gfortran.texi7
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index e1f72a1..fc0a033 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index c4992ef..1430c8a 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -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.