https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80263

--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
The consequence is that that internal type's name can mask out a user-defined
type with the same name.  For example:

$ cat sizetype2.c
char array[1];
typedef struct sizetype { char c; } sizetype;
sizetype sz;
int main () {}

$ /opt/gcc/bin/gcc sizetype2.c -o sizetype2 -g 
$ gdb ./sizetype2
(gdb) start
Temporary breakpoint 1, main () at sizetype2.c:4
4       int main () {}
(gdb) ptype sz
type = struct sizetype {
    char c;
}
(gdb) ptype sizetype
type = sizetype
(gdb) 

The last "ptype" above should have printed out the structure type.  Instead, it
printed GCC's "sizetype" integer type.

Reply via email to