This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/33429] debug info for class2 in g++.dg/other/unused1.C requires -femit-class-debug-always
- From: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2008 20:20:44 -0000
- Subject: [Bug debug/33429] debug info for class2 in g++.dg/other/unused1.C requires -femit-class-debug-always
- References: <bug-33429-507@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from mmitchel at gcc dot gnu dot org 2008-10-15 20:20 -------
The comment in the test says:
/* Make sure we didn't eliminate casted types because we thought they were
unused. */
If we don't want to do that any more, I think we can just remove this test,
rather than passing it special options.
But, I think it's odd if I'm in the debugger, looking at code that says:
return (X*)y;
if I can't say "print (X*)y".
If the type is coming from a library, we may not ever create objects of this
type.
Finally, we use vast amounts of space in object files for debug info, since we
emit the same debug info in multiple object files. Trying to optimize by not
emitting debug info in this case doesn't seem likely to be a big win given our
overall strategy. I don't have any data to support that claim, though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33429