------- Additional Comments From mark at codesourcery dot com  2004-11-19 22:54 
-------
Subject: Re:  [4.0 Regression] C++ debug is broken

hjl at lucon dot org wrote:
> ------- Additional Comments From hjl at lucon dot org  2004-11-19 22:50 
> -------
> Does this patch
> 
> --- toplev.c.bar        2004-11-16 10:13:18.000000000 -0800
> +++ toplev.c    2004-11-19 14:50:09.493493596 -0800
> @@ -818,6 +818,13 @@ check_global_declarations (tree *vec, in
>    for (i = 0; i < len; i++)
>      {
>        decl = vec[i];
> +
> +      if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
> +         && ! TREE_ASM_WRITTEN (decl))
> +       /* Cancel the RTL for this decl so that, if debugging info
> +          output for global variables is still to come, this one
> +          will be omitted.  */
> +       DECL_IGNORED_P (decl) = 1;
> 
>        /* Warn about any function
>          declared static but not defined.
> 
> make any senses? It makes the failed testcase to pass.

It makes much more sense that what was there before, although clearly 
the comment is wrong.  I've not yet worked out whether this is the right 
approach or not, though.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18556

Reply via email to