bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/16908] New: #line directives are ignored inside macros


From: cmetcalf at tilera dot com
Subject: [Bug gas/16908] New: #line directives are ignored inside macros
Date: Mon, 05 May 2014 21:01:22 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=16908

            Bug ID: 16908
           Summary: #line directives are ignored inside macros
           Product: binutils
           Version: 2.25 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: cmetcalf at tilera dot com

The following example generates wrong debug info for line numbers:

# 1 "file.S"
.macro test
# 100 "file.S"
.endm
nop

Because it is inside a macro, the "#line" directive is apparently ignored, and
the "nop" instruction ends up tagged as being on line 4.

This is particularly problematic as the C preprocessor will replace long C89
comment blocks, and long #if or #ifdef blocks that evaluate false, with just a
single "#line" directive.  (Short runs are just converted to blank lines.)

The upshot is that using #ifdefs or C89 comments in .macro directives causes
the line info for debugging to become useless.

Tested on x86 with 2.20, 2.24, and git tip at commit c888a17da5c7; and on
tilegx with 2.21.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]