Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/cgo: wrong line numbers in compiler messages #5272

Closed
mxk opened this issue Apr 11, 2013 · 4 comments
Closed

cmd/cgo: wrong line numbers in compiler messages #5272

mxk opened this issue Apr 11, 2013 · 4 comments
Milestone

Comments

@mxk
Copy link

mxk commented Apr 11, 2013

Relevant discussion: http://groups.google.com/d/msg/golang-nuts/YFEwhyw6K70/P8hJuaeV1FMJ

I think this is related to issue #4019. I can still reproduce the problem in tip, though
the line number is now off by 1 instead of 2 (in this particular example).

What steps will reproduce the problem?
Run 'go build test.go' (attached).

To see the desired behavior, run 'gcc -Wall -lcrypto test.c'.

What is the expected output?
# command-line-arguments
cc1: warnings being treated as errors
test.go: In function 'test':
test.go:8: warning: value computed is not used

What do you see instead?
# command-line-arguments
cc1: warnings being treated as errors
test.go: In function 'test':
test.go:7: warning: value computed is not used

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
FreeBSD 9.0-RELEASE-p5 amd64

Which version are you using?  (run 'go version')
go version devel +b3017cc3e17b Wed Apr 10 21:41:54 2013 -0700 freebsd/amd64

Attachments:

  1. test.go (139 bytes)
  2. test.c (93 bytes)
@minux
Copy link
Member

minux commented Apr 11, 2013

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 2:

Labels changed: added go1.2maybe.

@ianlancetaylor
Copy link
Contributor

Comment 3:

https://golang.org/cl/13498046

Owner changed to @ianlancetaylor.

Status changed to Started.

@ianlancetaylor
Copy link
Contributor

Comment 4:

This issue was closed by revision f68c23e.

Status changed to Fixed.

@mxk mxk added fixed labels Sep 4, 2013
@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants