GCC build failed for native with your patch on 2003-04-11T06:41:30Z.

Zack Weinberg zack@codesourcery.com
Fri Apr 11 16:35:00 GMT 2003


"GCC regression checker" <geoffk@apple.com> writes:

> With your recent patch, GCC does not compile on:
>  native
> Attached is build output for those targets.

I believe the appended patch should fix this bug, but I do not have
access to a Darwin system to verify it.  My apologies for not looking
thoroughly enough for remaining uses of IDENTIFIER_LOCAL_VALUE; this
really should be the last one.

zw

        * config/darwin-c.c (darwin_pragma_unused): Use lookup_name,
        and check DECL_CONTEXT to make sure we have a local.

===================================================================
Index: config/darwin-c.c
--- config/darwin-c.c	16 Dec 2002 18:20:08 -0000	1.4
+++ config/darwin-c.c	11 Apr 2003 16:34:14 -0000
@@ -136,9 +136,11 @@ darwin_pragma_unused (pfile)
       tok = c_lex (&decl);
       if (tok == CPP_NAME && decl)
 	{
-	  tree local = IDENTIFIER_LOCAL_VALUE (decl);
-	  if (local && (TREE_CODE (local) == PARM_DECL
-			|| TREE_CODE (local) == VAR_DECL))
+	  tree local = lookup_name (decl);
+	  if (local
+	      && DECL_CONTEXT (local)
+	      && (TREE_CODE (local) == PARM_DECL
+		  || TREE_CODE (local) == VAR_DECL))
 	    TREE_USED (local) = 1;
 	  tok = c_lex (&x);
 	  if (tok != CPP_COMMA)



More information about the Gcc-regression mailing list