This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/7580] incorrect/unfortunate DWARF-2 info for static const int class members
- From: "carlton at bactrian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2003 01:13:45 -0000
- Subject: [Bug debug/7580] incorrect/unfortunate DWARF-2 info for static const int class members
- References: <20020812125601.7580.carlton@math.stanford.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7580
------- Additional Comments From carlton@bactrian.org 2003-06-09 01:13 -------
(To be honest, it isn't the best bug report I've ever written: I really
shouldn't have conflated the two issues in one bug report. My apologies.)
I don't mind so much the fact that debug info is emitted for an uninitialized,
unreferenced static const int member: I don't really think that's a bug so
much as a quality-of-implementation issue. But
the other issue, that static members are labelled as DW_TAG_variable
instead of DW_TAG_member, really is a GCC bug. It's certainly not an
urgent one - GDB accepts it, and will continue to do so for the indefinite
future - but it's not what the DWARF 2 standard says to do, and it might
confuse other debuggers.
I have a GCC patch for it; I'll submit it once the next version of GDB is
released (since currently released versions of GDB don't actually accept
the correct debug info).