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]

Re: [libgfortran,patch] Remove set_args warning


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


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