From: Mike Frysinger Date: Fri, 22 Dec 2023 01:11:34 +0000 (-0500) Subject: sim: m32c: fix initial #line number in generated code X-Git-Tag: binutils-2_42~435 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=06bc778c13c8511ba8bc4c061dd59270c1a5e07c;p=thirdparty%2Fbinutils-gdb.git sim: m32c: fix initial #line number in generated code This emits #line 2 for the first line in the output when it should be 1. --- diff --git a/sim/m32c/opc2c.c b/sim/m32c/opc2c.c index da4da1c2a97..113e39072ab 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)