------- 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