20000131 anomolous system header warnings

Robert Lipe robertlipe@usa.net
Sun Feb 6 12:11:00 GMT 2000


Zack Weinberg wrote:
> On Fri, Feb 04, 2000 at 10:33:59PM +1100, Rodney Brown wrote:
> > The egcs-20000131 snapshot on i586-sco-sysv5uw7.1.0 gave lots of anomalous 
> > "defined but not used" warnings on include/sys/stat.h for {f,,l}stat.
> > These are static wrapper functions on UnixWare.
> 
> Try this.  It fixes the problem for me with your example, but may not
> be the right answer in general - there must have been some reason why
> we made a distinction between permanent and temporary decls here.

This fixes the general-case symptoms for me, too.  Without it,
trainloads of warnings are spewewd during a full bootstrap.

RJL

> zw
> 
> ===================================================================
> Index: tree.c
> --- tree.c	2000/01/17 15:55:18	1.115
> +++ tree.c	2000/02/04 17:25:16
> @@ -1061,7 +1061,7 @@ make_node (code)
>        if (code != FUNCTION_DECL)
>  	DECL_ALIGN (t) = 1;
>        DECL_IN_SYSTEM_HEADER (t)
> -	= in_system_header && (obstack == &permanent_obstack);
> +	= in_system_header && (ggc_p || obstack == &permanent_obstack);
>        DECL_SOURCE_LINE (t) = lineno;
>        DECL_SOURCE_FILE (t) = 
>  	(input_filename) ? input_filename : built_in_filename;


More information about the Gcc-bugs mailing list