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 debug/40109] New: Incorrect debug info nesting for typedef statements within namespaces


The following program:

namespace A{

  class B{
  };

  typedef A::B AB;
}

int main(){
  A::AB ab;
  return 0;
}

compiled with gcc generates the following debug info:
 ...
 <1><43>: Abbrev Number: 5 (DW_TAG_subprogram)
    <44>   DW_AT_external    : 1        
    <45>   DW_AT_name        : (indirect string, offset: 0x4c): main    
    <49>   DW_AT_decl_file   : 1        
    <4a>   DW_AT_decl_line   : 10       
    <4b>   DW_AT_type        : <0x91>   
    <4f>   DW_AT_low_pc      : 0x40053c 
    <57>   DW_AT_high_pc     : 0x400547 
    <5f>   DW_AT_frame_base  : 0x0      (location list)
    <63>   DW_AT_sibling     : <0x91>   
 <2><67>: Abbrev Number: 6 (DW_TAG_lexical_block)
    <68>   DW_AT_low_pc      : 0x400540 
    <70>   DW_AT_high_pc     : 0x400545 
 <3><78>: Abbrev Number: 7 (DW_TAG_typedef)
    <79>   DW_AT_name        : AB       
    <7c>   DW_AT_decl_file   : 1        
    <7d>   DW_AT_decl_line   : 7        
    <7e>   DW_AT_type        : <0x3b>   
...

The typedef tag <78> is a child of subprogram main instead of
namespace A.


-- 
           Summary:  Incorrect debug info nesting for typedef statements
                    within namespaces
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dodji at gcc dot gnu dot org


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


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