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. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils