This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libgfortran,patch] Remove set_args warning


The recent rework of main() and MAIN__() has introduced the following warning when building libgfortran:

../../../trunk/libgfortran/fmain.c: In function ‘main’:
../../../trunk/libgfortran/fmain.c:13:3: warning: implicit declaration of function ‘_gfortran_set_args’


This warning is fixed by the following patch:


Index: runtime/main.c =================================================================== --- runtime/main.c (revision 148352) +++ runtime/main.c (working copy) @@ -131,6 +131,7 @@ argv_save = argv; store_exe_path (argv[0]); } +iexport(set_args);


/* Retrieve the saved values of the command line arguments. */ Index: libgfortran.h =================================================================== --- libgfortran.h (revision 148352) +++ libgfortran.h (working copy) @@ -606,7 +606,7 @@ internal_proto(stupid_function_name_for_static_linking);

 extern void set_args (int, char **);
-export_proto(set_args);
+iexport_proto(set_args);

 extern void get_args (int *, char ***);
 internal_proto(get_args);
Index: fmain.c
===================================================================
--- fmain.c	(revision 148352)
+++ fmain.c	(working copy)
@@ -10,7 +10,7 @@
 main (int argc, char *argv[])
 {
   /* Set up the runtime environment.  */
-  PREFIX(set_args) (argc, argv);
+  set_args (argc, argv);

   /* Call the Fortran main program.  Internally this is a function
      called MAIN__ */



Bootstrapped and regtested on i386-darwin, OK to commit?



2009-06-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>

        * fmain.c (main): Don't PREFIX set_args.
        * libgfortran.h (set_args): Use iexport_proto.
        * runtime/main.c (set_args): Use iexport.



FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]