http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45997
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dodji at gcc dot gnu.org, | |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-03 13:20:55 UTC --- The DWARF standard requires a name to be emitted and that's why we do emit there something, to follow the standard. There are talks about changing this, but no changes have been made yet. That said, ideally we wouldn't be emitting nameless base types or __unknown__ named base types in this case, I guess the problem is just that we try to remove const/volatile in a fixed order and your testcase has it exactly in the opposite order. With: typedef int my_int; typedef volatile my_int volatile_my_int; typedef const volatile_my_int const_volatile_my_int; my_int v_my_int = 0; volatile_my_int v_volatile_my_int = 1; const_volatile_my_int v_const_volatile_my_int = 4; int main () { return 0; } the result is expected, always refering to the previous typedef DIE.