This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/47510] DW_TAG_typedef can have children when designating a naming typedef
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Mar 2011 16:24:50 +0000
- Subject: [Bug debug/47510] DW_TAG_typedef can have children when designating a naming typedef
- Auto-submitted: auto-generated
- References: <bug-47510-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47510
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-15 16:24:27 UTC ---
(In reply to comment #4)
> This is because G++ generates struct F<int>::C. The instantiated
> F<int>::C a typedef. No anonymous struct is generated inside F<int>.
> What is generated is really the same as for:
>
> template<typename T>
> class F
> {
> struct C {int i};
> C a;
> };
> F<int> f;
>
> I guess we could try hard to trick the dwarf emitter into describing
> debug information for a typedef and an anonymous code that is actually
> not generated (instantiated), but would that be really worth it?
See also PR47939. Yes, debug info consumers expect typedefs to be available
if they are used in source.