This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/23336] [4.0/4.1/4.2 Regression] enum constants not visible to gdb because of -feliminate-unused-debug-types
- From: "drow at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jul 2006 18:06:35 -0000
- Subject: [Bug debug/23336] [4.0/4.1/4.2 Regression] enum constants not visible to gdb because of -feliminate-unused-debug-types
- References: <bug-23336-360@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from drow at gcc dot gnu dot org 2006-07-22 18:06 -------
Hmm. What's happening here is that we set TREE_USED on the enumerator, but not
on the type. The enumerator never gets output, because the type is not output.
It would probably be a strict improvement to add the type to the used_types
hash table like we now do for casts.
However, that is not a great solution either. It won't cause the enum to be
emitted for "static int x = JTI_MAX;" at the global scope even if x is emitted.
We really need a more general solution to this...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23336