Given the following simple code snippet, tested on x86_64-pc-linux-gnu, i686-pc-linux-gnu, and i686-pc-mingw32: << struct Elem { int data; struct Elem* next; }; int main () { struct Elem* list; return 0; } >> Compile with: g++ main.cc -o main run under gdb: gdb main ptype Elem yields: type = struct Elem { int data; void *next; } instead of (with e.g. g++ 4.4.3): type = struct Elem { int data; Elem *next; }
Note that this works fine on mainline and 4.3.x, 4.4.x
*** This bug has been marked as a duplicate of 44645 ***