bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/30162] New: Discrepancy in the interface exposed to tc_frob_lab


From: piannetta at kalrayinc dot com
Subject: [Bug gas/30162] New: Discrepancy in the interface exposed to tc_frob_label
Date: Fri, 24 Feb 2023 08:52:30 +0000

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

            Bug ID: 30162
           Summary: Discrepancy in the interface exposed to tc_frob_label
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: piannetta at kalrayinc dot com
  Target Milestone: ---

After reading a label in gas/read.c, a CPU-specific back-end can register the
TC_FROB_LABEL hook.  However, the position of the INPUT_LINE_POINTER is not the
same whether the label is surrounded by quotes or not:
  - when the label is not surrounded by quotes, *INPUT_LINE_POINTER is the
character after the colon;
  - when the label is surrounded by quotes, *INPUT_LINE_POINTER is the colon
itself.

I would expect that in both cases, *INPUT_LINE_POINTER is the character after
the colon.  A simple fix would be to move the INPUT_LINE_POINTER once more when
the label symbol is terminated by a '"'.

diff --git a/gas/read.c b/gas/read.c
--- a/gas/read.c
+++ b/gas/read.c
@@ -986,6 +986,8 @@ read_a_source_file (const char *name)
              nul_char = get_symbol_name (& s); /* name's delimiter.  */
              next_char = (nul_char == '"' ? input_line_pointer[1] : nul_char);
              rest = input_line_pointer + (nul_char == '"' ? 2 : 1);
+             if (nul_char == '"')
+               ++input_line_pointer;

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