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: "dodji at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Mar 2011 10:14:47 +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
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #6 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-03-16 10:14:42 UTC ---
> See also PR47939. Yes, debug info consumers expect typedefs to be available
> if they are used in source.
I'll try again a little bit :-)
I think for templates the situation is a little bit different from
non-templates cases like PR47939. Generally speaking we emit close to
no debug info for template *definitions*. We emit debug info for
template instantiations.
As the instantiation doesn't contain the typedef (because
[dcl.typedef/8] says that the typedef actually names the anonymous
struct, so it is valid that the lookup of C yields a struct named C) I
find it acceptable to emit the debug info that is emitted now.
Now a possible way to go would be to change the output of the
instantiation; i.e make G++ generate the typedef and the anonymous type.
Just like what is done in the non-template case. If this is agreed upon
by the C++ maintainers then I guess it could be a separate patch that
would go in after the one I am proposing at
http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00781.html