This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libgfortran,patch] Remove set_args warning
- From: FX <fxcoudert at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org, Fortran List <fortran at gcc dot gnu dot org>
- Cc: Tobias Burnus <burnus at net-b dot de>
- Date: Sun, 14 Jun 2009 11:09:15 +0200
- Subject: [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