Warnings patrol

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Mon Jan 20 18:30:00 GMT 2003


David Edelsohn <dje@watson.ibm.com> writes:

>         * collect2.c (ldgetname): Expand declaration to prototype.

> Index: collect2.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/collect2.c,v
> retrieving revision 1.143
> diff -c -p -r1.143 collect2.c
> *** collect2.c	16 Dec 2002 18:19:07 -0000	1.143
> --- collect2.c	20 Jan 2003 02:23:14 -0000
> *************** ignore_library (name)
> *** 2720,2726 ****
>   }
>   #endif /* COLLECT_EXPORT_LIST */
>   
> ! extern char *ldgetname ();
>   
>   /* COFF version to scan the name list of the loaded program for
>      the symbols g++ uses for static constructors and destructors.
> --- 2720,2726 ----
>   }
>   #endif /* COLLECT_EXPORT_LIST */
>   
> ! extern char *ldgetname PARAMS ((struct ldfile *, void *));
>   
>   /* COFF version to scan the name list of the loaded program for
>      the symbols g++ uses for static constructors and destructors.

I fear this change will break Tru64 UNIX builds (or at least generate a
warning on that platform): ldgetname() is declared in <ldfcn.h> as

extern  char    *ldgetname __((LDFILE *, pSYMR));

with LDFILE != struct ldfile.  I suppose this is the reason why ldgetname
is not currently prototyped.

	Rainer



More information about the Gcc-patches mailing list