Given this testcase: typedef int my_int; typedef const my_int const_my_int; typedef volatile my_int volatile_my_int; typedef volatile const_my_int volatile_const_my_int; typedef const volatile_my_int const_volatile_my_int; my_int v_my_int (0); const_my_int v_const_my_int (1); volatile_my_int v_volatile_my_int (2); const_volatile_my_int v_const_volatile_my_int (3); volatile_const_my_int v_volatile_const_my_int (4); int main () { return 0; } ptype will drop const/volatile information. (gdb) ptype v_const_my_int type = int (gdb) ptype v_volatile_my_int type = int (gdb) ptype v_const_volatile_my_int type = int
These all work for me with CVS HEAD: (gdb) ptype v_const_my_int type = const int (gdb) ptype v_volatile_my_int type = volatile int (gdb) ptype v_const_volatile_my_int type = const volatile int (gdb) ptype v_volatile_const_my_int type = const volatile int I'm using the Fedora 16 system gcc. If it still fails for you I would suspect a compiler bug. I'm closing the bug.