Patchwork [FORTRAN] Add libcaf prototype

login
register
mail settings
Submitter David Edelsohn
Date May 5, 2013, 5:43 p.m.
Message ID <CAGWvnynwsG+v5qH2=LOLszRco8QO2cMMqawgoGHFaZOeqQBH4A@mail.gmail.com>
Download mbox | patch
Permalink /patch/241521/
State New
Headers show

Comments

David Edelsohn - May 5, 2013, 5:43 p.m.
libcaf produces warnings because it defines functions without
prototypes.  This patch adds prototypes.

Bootstrapped on powerpc-ibm-aix7.1.0.0.

Thanks, David


       * libcaf.h (_gfortran_caf_critical): Add a prototype.
       (_gfortran_caf_end_critical): Same.
Tobias Burnus - May 5, 2013, 6:19 p.m.
David Edelsohn wrote:
> libcaf produces warnings because it defines functions without
> prototypes.  This patch adds prototypes.
>
> Bootstrapped on powerpc-ibm-aix7.1.0.0.

OK - given that the removal of _gfortran_caf_critical takes longer than 
expected, it makes sense to add a prototype to silence the warning.

Tobias

>         * libcaf.h (_gfortran_caf_critical): Add a prototype.
>         (_gfortran_caf_end_critical): Same.
>
> Index: libcaf.h
> ===================================================================
> --- libcaf.h    (revision 198603)
> +++ libcaf.h    (working copy)
> @@ -76,7 +76,10 @@
>
>   /* FIXME: The CRITICAL functions should be removed;
>      the functionality is better represented using Coarray's lock feature.  */
> +void _gfortran_caf_critical (void);
>   void _gfortran_caf_critical (void)  { }
> +
> +void _gfortran_caf_end_critical (void);
>   void _gfortran_caf_end_critical (void)  { }
>

Patch

Index: libcaf.h
===================================================================
--- libcaf.h    (revision 198603)
+++ libcaf.h    (working copy)
@@ -76,7 +76,10 @@ 

 /* FIXME: The CRITICAL functions should be removed;
    the functionality is better represented using Coarray's lock feature.  */
+void _gfortran_caf_critical (void);
 void _gfortran_caf_critical (void)  { }
+
+void _gfortran_caf_end_critical (void);
 void _gfortran_caf_end_critical (void)  { }