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/23618] New: GCC seems to generate line number information for the same line in two places


When compiling a function with an empty body, e.g.
  int MyFunc(void)
    {
    }
GCC seems to add line number information for the line containing the opening
bracket in two different places. 

Here is an example assembler output:
----
.globl MyFunc
        .type   MyFunc, @function
MyFunc:
.LFB3:
        .loc 1 5 0
        pushl   %ebp
.LCFI0:
        movl    %esp, %ebp
.LCFI1:
        .loc 1 5 0
        popl    %ebp
        ret
.LFE3:
----
Line number information for line 5 (the opening bracket) is seems to be added in
two places.

-- 
           Summary: GCC seems to generate line number information for the
                    same line in two places
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tommi dot hoynalanmaa at iki dot fi
                CC: gcc-bugs at gcc dot gnu dot org


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


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