[llvm-bugs] [Bug 34950] New: clang reports incorrect line numbers for errors in assembly files

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 14 14:18:39 PDT 2017


            Bug ID: 34950
           Summary: clang reports incorrect line numbers for errors in
                    assembly files
           Product: new-bugs
           Version: 5.0
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mike.benfield at gmail.com
                CC: llvm-bugs at lists.llvm.org

If my assembly file has comments, clang reports incorrect line numbers.

$ cat trash.s
.intel_syntax noprefix

        .global _main
        # text
        # text
        # text
        # text
        # text
        mov     bogus_name, 20
        # text
        # text
        # text
        # text
        # text
        mov     rax, 5
$ clang trash.s
trash.s:16:6: error: ambiguous operand size for instruction 'mov'
 mov bogus_name, 20

That should be line 11, but it says 16.

Note that this is presumably caused by the same underlying problem as Bug
33664, which I reported earlier. I decided to report this new bug with a
different manifestation of the problem, because the other bug report got no
attention, despite apparently being critical to the basic usability of the
assembler. (Speaking of which... someone else somewhere is actually using
clang's assembler, right? It seems odd that a bug like this, one which surely
anyone using the software would notice and be frustrated by, could persist for
so long.)

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171014/e0d5dfbf/attachment.html>

More information about the llvm-bugs mailing list