[Bug c++/26965] [4.0/4.1/4.2 Regression] Unnecessary debug info for unused consts in C++

drow at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Jul 22 19:39:00 GMT 2006



------- Comment #9 from drow at gcc dot gnu dot org  2006-07-22 19:39 -------
Ian, could you say why you think that patch is responsible?  I wonder if your
testcase would behave any differently on either side of the patch; it might be
something different taking up all the space.

I think the situation is simpler, and harder to fix.  The debug generators make
decisions based on TREE_USED.  TREE_USED is set in many cases during parsing;
but of course we parse more functions than we necessarily emit.  As long as we
commit to outputing a particular piece of debug information during parsing
we're going to have this problem.

beg gets its mark_used during finish_id_expression, called during parsing of
c::foo.

I don't see any way to solve this without replacing TREE_USED at parse time
with a set of hash tables attached to far too many objects, reporting what each
one would like to have emitted.  But this would be awful for performance and
memory use.  I'm open to better ideas if you have one.

Meanwhile, I do not find it likely that we will fix this for 4.2.


-- 

drow at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |drow at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list