]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: m32c: fix initial #line number in generated code
authorMike Frysinger <vapier@gentoo.org>
Fri, 22 Dec 2023 01:11:34 +0000 (20:11 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 22 Dec 2023 01:17:38 +0000 (20:17 -0500)
This emits #line 2 for the first line in the output when it should be 1.

sim/m32c/opc2c.c

index da4da1c2a97f61d9ee0232d2d8353f9389fa2b03..113e39072abe6717e8a78ca058391d8655a1ed6f 100644 (file)
@@ -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)