Re: RFC: handle case arising from GCC PR 47510

Tom Tromey
2011-02-03T21:07:55Z

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> Then cp_lookup_nested_type crashes as TYPE_TAG_NAME (parent_type)
Jan> == NULL - which is correct for anonymous struct - but
Jan> cp_lookup_nested_type does not expect it.
[...]

After coming up with some more examples, it turns out that the DWARF
reading part of this patch is very misguided. In particular it would
fail if the typedef appeared before the anonymous struct (and GCC did
emit this when a namespace was used). And, a more complicated solution
(deferring this smashing until after all DIEs were processed) had a
problem of its own (we needed multi-level deferrals due to local types).

I've asked for a new attribute from GCC, instead, to make the problem
more tractable on the gdb side. We'll see what happens.

Meanwhile I will probably put in the valops.c change.

Tom