From 3199cb41b8ce1a062ef9f065bc3536bff0d9c401 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Fri, 6 Feb 2004 18:37:25 +0000 Subject: [PATCH] re PR debug/11816 (Incorrect debugging information for anonymous structures) PR debug/11816 * dwarf2out.c (gen_decl_die): Handle anonymous struct members. From-SVN: r77411 --- gcc/ChangeLog | 5 +++++ gcc/dwarf2out.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 19454ac442e9..ebedd173db81 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-02-06 Ulrich Weigand + + PR debug/11816 + * dwarf2out.c (gen_decl_die): Handle anonymous struct members. + 2004-02-06 Ulrich Weigand * cfganal.c (flow_call_edges_add): Never split a libcall block. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 468b6dd628e4..68698730c994 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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); -- 2.47.2