From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17314 invoked by alias); 16 Mar 2011 10:14:56 -0000 Received: (qmail 17303 invoked by uid 22791); 16 Mar 2011 10:14:55 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Mar 2011 10:14:48 +0000 From: "dodji at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/47510] DW_TAG_typedef can have children when designating a naming typedef X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dodji at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dodji at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 16 Mar 2011 10:25:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg01646.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47510 Dodji Seketeli changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #6 from Dodji Seketeli 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