Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2242)

Issue 98580046: code review 98580046: cmd/cgo: given typedef struct S T, make C.T and C.struc... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by rsc
Modified:
9 years, 11 months ago
Reviewers:
r, gobot, iant
CC:
golang-codereviews, iant, r
Visibility:
Public.

Description

cmd/cgo: given typedef struct S T, make C.T and C.struct_S interchangeable For incomplete struct S, C.T and C.struct_S were interchangeable in Go 1.2 and earlier, because all incomplete types were interchangeable (even C.struct_S1 and C.struct_S2). CL 76450043, which fixed issue 7409, made different incomplete types different from Go's point of view, so that they were no longer completely interchangeable. However, imprecision about C.T and C.struct_S - really the same underlying C type - is the one behavior enabled by the bug that is most likely to be depended on by existing cgo code. Explicitly allow it, to keep that code working. Fixes issue 7786.

Patch Set 1 #

Patch Set 2 : diff -r a6e0219d9967 https://code.google.com/p/go/ #

Patch Set 3 : diff -r eedf259bba6f https://code.google.com/p/go/ #

Patch Set 4 : diff -r eedf259bba6f https://code.google.com/p/go/ #

Total comments: 8

Patch Set 5 : diff -r f781e2c0c3f5 https://code.google.com/p/go/ #

Total comments: 1

Patch Set 6 : diff -r b8e9497247d2 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -8 lines) Patch
M doc/go1.3.html View 1 2 3 4 5 1 chunk +7 lines, -1 line 0 comments Download
A misc/cgo/test/issue7786.go View 1 2 3 4 1 chunk +51 lines, -0 lines 0 comments Download
M src/cmd/cgo/gcc.go View 1 2 3 4 5 chunks +44 lines, -7 lines 0 comments Download

Messages

Total messages: 10
rsc
Hello golang-codereviews@googlegroups.com (cc: iant), I'd like you to review this change to https://code.google.com/p/go/
9 years, 11 months ago (2014-05-28 04:00:14 UTC) #1
rsc
Hello golang-codereviews@googlegroups.com (cc: golang-codereviews@googlegroups.com, iant, iant@golang.org, r), Please take another look.
9 years, 11 months ago (2014-05-28 04:00:25 UTC) #2
rsc
Added r for go1.3.html
9 years, 11 months ago (2014-05-28 04:00:36 UTC) #3
iant
https://codereview.appspot.com/98580046/diff/60001/src/cmd/cgo/gcc.go File src/cmd/cgo/gcc.go (right): https://codereview.appspot.com/98580046/diff/60001/src/cmd/cgo/gcc.go#newcode1215 src/cmd/cgo/gcc.go:1215: if dt.ByteSize < 0 { I think you need ...
9 years, 11 months ago (2014-05-28 14:08:42 UTC) #4
rsc
PTAL https://codereview.appspot.com/98580046/diff/60001/src/cmd/cgo/gcc.go File src/cmd/cgo/gcc.go (right): https://codereview.appspot.com/98580046/diff/60001/src/cmd/cgo/gcc.go#newcode1215 src/cmd/cgo/gcc.go:1215: if dt.ByteSize < 0 { On 2014/05/28 14:08:42, ...
9 years, 11 months ago (2014-05-28 15:29:57 UTC) #5
iant
LGTM
9 years, 11 months ago (2014-05-28 15:33:53 UTC) #6
rsc
Thanks. Will wait for r.
9 years, 11 months ago (2014-05-28 15:35:33 UTC) #7
r
LGTM https://codereview.appspot.com/98580046/diff/80001/doc/go1.3.html File doc/go1.3.html (right): https://codereview.appspot.com/98580046/diff/80001/doc/go1.3.html#newcode255 doc/go1.3.html:255: incomplete struct to a different named type. </p> ...
9 years, 11 months ago (2014-05-28 16:06:09 UTC) #8
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=177ed19da89f *** cmd/cgo: given typedef struct S T, make C.T and C.struct_S ...
9 years, 11 months ago (2014-05-28 18:04:34 UTC) #9
gobot
9 years, 11 months ago (2014-05-28 18:18:52 UTC) #10
Message was sent while issue was closed.
This CL appears to have broken the netbsd-amd64-bsiegert builder.
See http://build.golang.org/log/9744b65d4aaf0be61d453a6e634ac4e432b7ca36
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b