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

Issue 5372041: code review 5372041: gc: better error for non-calling use of unsafe builtins. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 1 month ago by lvd
Modified:
14 years, 1 month ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

gc: better error for non-calling use of unsafe builtins. Fixes issue 1951

Patch Set 1 #

Patch Set 2 : diff -r afa4ccab6746 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r afa4ccab6746 https://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 4 : diff -r aa5e8990427e https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r aa5e8990427e https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -2 lines) Patch
M src/cmd/gc/go.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/typecheck.c View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/cmd/gc/unsafe.c View 1 2 3 4 4 chunks +17 lines, -2 lines 0 comments Download
A test/fixedbugs/bug376.go View 1 2 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 3
lvd
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 1 month ago (2011-11-09 11:00:31 UTC) #1
rsc
LGTM http://codereview.appspot.com/5372041/diff/5001/src/cmd/gc/typecheck.c File src/cmd/gc/typecheck.c (right): http://codereview.appspot.com/5372041/diff/5001/src/cmd/gc/typecheck.c#newcode214 src/cmd/gc/typecheck.c:214: yyerror("builtin %N is not an expression, must be ...
14 years, 1 month ago (2011-11-09 17:23:56 UTC) #2
lvd
14 years, 1 month ago (2011-11-09 17:31:00 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=d4b32a24a1d7 ***

gc: better error for non-calling use of unsafe builtins.

Fixes issue 1951

R=rsc
CC=golang-dev
http://codereview.appspot.com/5372041

http://codereview.appspot.com/5372041/diff/5001/src/cmd/gc/typecheck.c
File src/cmd/gc/typecheck.c (right):

http://codereview.appspot.com/5372041/diff/5001/src/cmd/gc/typecheck.c#newcod...
src/cmd/gc/typecheck.c:214: yyerror("builtin %N is not an expression, must be
called", n);
On 2011/11/09 17:23:56, rsc wrote:
> s/builtin //
> just one less jargon word to understand.  
> it will say 'unsafe.Sizeof' or whatever,
> so that should be clear enough.

Done.

http://codereview.appspot.com/5372041/diff/5001/src/cmd/gc/unsafe.c
File src/cmd/gc/unsafe.c (right):

http://codereview.appspot.com/5372041/diff/5001/src/cmd/gc/unsafe.c#newcode106
src/cmd/gc/unsafe.c:106: if(n ==N || n->op != ONAME || n->sym == S ||
n->sym->pkg != unsafepkg)
On 2011/11/09 17:23:56, rsc wrote:
> s/N/ N/

Done.
Sign in to reply to this message.

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