Am 03.01.25 um 14:32 schrieb Sam James:
Thomas Koenig <tkoe...@netcologne.de> writes:

Hello world,

I noticed that there is no mention of automatically generating
C prototypes and declarations in the relevant section of
the docs, "Interoperability with C". This patch remedies that.

OK for trunk?

Best regards

        Thomas

gcc/fortran/ChangeLog:

        * gfortran.texi: New subsection "Generating C prototypes from
        Fortran".

[2. text/x-patch; p-unsigned.diff]...

This patch appears empty.

Not only appears, but it actually was empty...

This is a better version.

Best regards

        Thomas

diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index 4509f080ba4..c1fc6a6fcbd 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -2918,6 +2918,7 @@ C or some other language instead of Fortran, see
 * Interoperable Subroutines and Functions::
 * Working with C Pointers::
 * Further Interoperability of Fortran with C::
+* Generating C prototypes from Fortran::
 @end menu
 
 Since Fortran 2003 (ISO/IEC 1539-1:2004(E)) there is a
@@ -3322,6 +3323,20 @@ are converted to the specified form.  If you need to access GNU Fortran's
 internal array descriptor, you can use the Chasm Language Interoperability
 Tools, @url{http://chasm-interop.sourceforge.net/}.
 
+@node Generating C prototypes from Fortran
+@subsection Generating C prototypes from Fortran
+@cindex prototypes
+@cindex C prototypes
+The options @option{-fc-prototypes} can be used to write out C
+declatations and function prototypes for @code{BIND(C)} entities.
+The same can be done for writing out prototypes for external
+procedures using @option{-fc-prototypes-external},
+@pxref{Interoperability Options}.
+
+Standard Fortran does not specify an interoperable type for C's
+@code{unsigned} integer types.  For interoperability with unsigned
+types, GNU Fortran provides unsigned integers, @pxref{Unsigned integers}.
+
 @node GNU Fortran Compiler Directives
 @section GNU Fortran Compiler Directives
 @cindex GNU Fortran Compiler Directives

Reply via email to