https://gcc.gnu.org/g:92ad6d4ebfe5454b9299f295926517bd453bc4a2

commit r15-6550-g92ad6d4ebfe5454b9299f295926517bd453bc4a2
Author: Thomas Koenig <tkoe...@gcc.gnu.org>
Date:   Fri Jan 3 18:31:07 2025 +0100

    Mention generating C prototypes in the C interop documentation.
    
    gcc/fortran/ChangeLog:
    
            * gfortran.texi: New subsection "Generating C prototypes from
            Fortran".

Diff:
---
 gcc/fortran/gfortran.texi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index 430ede45ea1b..116667245932 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