bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/19499] as ignores .file directives when generating error messag


From: nickc at redhat dot com
Subject: [Bug gas/19499] as ignores .file directives when generating error messages
Date: Wed, 20 Jan 2016 13:29:58 +0000

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

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |nickc at redhat dot com

--- Comment #1 from Nick Clifton <nickc at redhat dot com> ---
Hi Rupert,

  It would appear that it is necessary to define both the logical file name
*and* the logical line number in order for the error message to use the
specified values:

  $ cat test2.s
  .file "test.c"
  .line 10
      some_nonesense_insn 1 2 3
  $ as test2.s
  test.c: Assembler messages:
  test.c:11: Error: no such instruction: `some_nonsense_insn 1 2 3'

  Also it is necessary to use the non-DAWRF version of the .line pseudo-op in
order for this feature to work:

 $ cat test3.s
  .file 5 "test.c"
  .line 10
      some_nonesense_insn 1 2 3
  $ as test3.s
  test3.s: Assembler messages:
  test3.s:3: Error: no such instruction: `some_nonsense_insn 1 2 3'

I am not sure however as to whether the assembler or the documentation is
wrong.  The obvious answer would be that the assembler is wrong, since it has
been provided with file and line number information.  But the counter to that
is that in most cases using the source file/line number information in the
error message would be very unhelpful, since it is not (usually) the source
code that contains the bug - it is the assembler output that has been generated
from the source file.  Hence providing an assembler source/line number
combination in an error message is actually quite helpful.

I am leaning towards updating the documentation.  How do you feel about this ?

Cheers
  Nick

-- 
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]