Commit 340f28de authored by Luuk van Dijk's avatar Luuk van Dijk

runtime: correct line numbers for .goc files.

Linenumbers start at 1.
Also call goc2c with an absolute pathi to preserve debug info.

R=rsc, r, ken2
CC=golang-dev
https://golang.org/cl/1954049
parent a48b35e9
......@@ -132,7 +132,7 @@ version.go: mkversion
./mkversion >version.go
%.c: %.goc goc2c
./goc2c $< > $@.tmp
./goc2c `pwd`/$< > $@.tmp
mv -f $@.tmp $@
%.$O: $(GOARCH)/%.c
......
......@@ -28,7 +28,7 @@ static int gcc;
/* File and line number */
static const char *file;
static unsigned int lineno;
static unsigned int lineno = 1;
/* List of names and types. */
struct params {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment