[C PATCH] Emit debug info for block local externs from C (PR debug/39563, take 2)

Jakub Jelinek jakub@redhat.com
Mon Mar 30 11:22:00 GMT 2009


On Sun, Mar 29, 2009 at 10:09:02AM -0600, Tom Tromey wrote:
> >>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:
> 
> Jakub> @@ -824,6 +827,26 @@ pop_scope (void)
> Jakub>  	      TREE_CHAIN (p) = BLOCK_VARS (block);
> Jakub>  	      BLOCK_VARS (block) = p;
> Jakub>  	    }
> Jakub> +	  else if (VAR_OR_FUNCTION_DECL_P (p))
> Jakub> +	    {
> Jakub> +	      tree extp = copy_node (p);
> Jakub> +
> Jakub> +	      DECL_EXTERNAL (extp) = 1;
> Jakub> +	      TREE_STATIC (extp) = 0;
> [...]
> 
> I think this bit of code could use a comment explaining what it is
> for.  It isn't clear from the context that this is used solely for
> debug info generation.

Ok, here is an updated patch with an extra comment and also
setting up DECL_CONTEXT (extp) to current_function_decl.
Bootstrapped/regtested on x86_64-linux, ok for trunk?

	Jakub



More information about the Gcc-patches mailing list