This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/44188] Fails to produce DW_AT_typedef for typedef of anonymous struct



------- Comment #8 from dodji at gcc dot gnu dot org  2010-06-06 18:24 -------
Subject: Bug 44188

Author: dodji
Date: Sun Jun  6 18:24:27 2010
New Revision: 160347

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160347
Log:
Fix PR c++/44188

gcc/ChangeLog:
        PR c++/44188
        * c-common.c (is_typedef_decl): Move this definition ...
        * tree.c (is_typedef_decl): ... here.
        (typdef_variant_p): Move definition here from gcc/cp/tree.c.
        * c-common.h (is_typedef_decl): Move this declaration ...
        * tree.h (is_typedef_decl): ... here.
        (typedef_variant_p): Move declaration here from gcc/cp/cp-tree.h
        * dwarf2out.c (is_naming_typedef_decl): New function.
        (gen_tagged_type_die): Split out of ...
        (gen_type_die_with_usage): ... this function. When an anonymous
        tagged type is named by a typedef, make sure a DW_TAG_typedef DIE
        is emitted for the typedef.
        (gen_typedef_die): Emit DW_TAG_typedef also for typedefs naming
        anonymous tagged types.

gcc/cp/ChangeLog:
        PR c++/44188
        * cp-tree.h (typedef_variant_p): Move this declaration to
        gcc/tree.h.
        * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
        * decl.c (grokdeclarator): Do not rename debug info of an
        anonymous tagged type named by a typedef.

gcc/testsuite/ChangeLog:
        PR c++/44188
        * g++.dg/debug/dwarf2/typedef3.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/typedef3.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/c-family/c-common.h
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/tree.c
    trunk/gcc/dwarf2out.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree.c
    trunk/gcc/tree.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44188


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]