[PATCH/committed] sim: m32c: fix initial #line number in generated code

Message ID 20231222011803.27861-1-vapier@gentoo.org
State New
Headers
Series [PATCH/committed] sim: m32c: fix initial #line number in generated code |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged

Commit Message

Mike Frysinger Dec. 22, 2023, 1:18 a.m. UTC
  This emits #line 2 for the first line in the output when it should be 1.
---
 sim/m32c/opc2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/sim/m32c/opc2c.c b/sim/m32c/opc2c.c
index da4da1c2a97f..113e39072abe 100644
--- a/sim/m32c/opc2c.c
+++ b/sim/m32c/opc2c.c
@@ -282,7 +282,7 @@  dump_lines (opcode * op, int level, Indirect * ind)
 		varnames[i], (i < vn - 1) ? "," : "\\n", varnames[i]);
       printf ("%*s    }\n", level, "");
     }
-  printf ("#line %d \"%s\"\n", op->lineno + 1, orig_filename);
+  printf ("#line %d \"%s\"\n", op->lineno, orig_filename);
   for (i = 0; i < op->nlines; i++)
     printf ("%*s%s", level, "", op->lines[i]);
   if (op->comment)