This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libgfortran,patch] Remove set_args warning
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: FX <fxcoudert at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Fortran List <fortran at gcc dot gnu dot org>, Tobias Burnus <burnus at net-b dot de>
- Date: Sun, 14 Jun 2009 08:48:22 -0700
- Subject: Re: [libgfortran,patch] Remove set_args warning
- References: <36C054EF-169A-44EC-8ECC-6EA2FD5BAB36@gmail.com>
On Sun, Jun 14, 2009 at 11:09:15AM +0200, FX wrote:
> 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);
>
By removing PREFIX() do we loose the _gfortran_? If so,
do we need to update gfortran.map?
REMOVE:kargl[205] grep set_arg gfortran.map
_gfortran_set_args;
--
Steve