This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18556] [4.0 Regression] C++ debug is broken
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Nov 2004 22:54:24 -0000
- Subject: [Bug c++/18556] [4.0 Regression] C++ debug is broken
- References: <20041118220954.18556.hjl@lucon.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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