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

Reply via email to