]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/11816 (Incorrect debugging information for anonymous structures)
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 6 Feb 2004 18:37:25 +0000 (18:37 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Fri, 6 Feb 2004 18:37:25 +0000 (18:37 +0000)
PR debug/11816
* dwarf2out.c (gen_decl_die): Handle anonymous struct members.

From-SVN: r77411

gcc/ChangeLog
gcc/dwarf2out.c

index 19454ac442e9a42af108717ac01308da76af78f6..ebedd173db81fc50e88b9187735be415811aaf8d 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-06  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       PR debug/11816
+       * dwarf2out.c (gen_decl_die): Handle anonymous struct members.
+
 2004-02-06  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * cfganal.c (flow_call_edges_add): Never split a libcall block.
index 468b6dd628e4cfe08e1844ee11f814c546ecf6f3..68698730c994a7f8ed03f962a7394f0055558a13 100644 (file)
@@ -12192,9 +12192,10 @@ gen_decl_die (tree decl, dw_die_ref context_die)
 
     case FIELD_DECL:
       /* Ignore the nameless fields that are used to skip bits but handle C++
-        anonymous unions.  */
+        anonymous unions and structs.  */
       if (DECL_NAME (decl) != NULL_TREE
-         || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE)
+         || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE
+         || TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE)
        {
          gen_type_die (member_declared_type (decl), context_die);
          gen_field_die (decl, context_die);