File tree Expand file tree Collapse file tree 2 files changed +27
-18
lines changed
src/cmd/compile/internal/gc Expand file tree Collapse file tree 2 files changed +27
-18
lines changed Original file line number Diff line number Diff line change @@ -1185,37 +1185,35 @@ OpSwitch:
1185
1185
1186
1186
// call and call like
1187
1187
case OCALL :
1188
+ n .Left = typecheck (n .Left , Erv | Etype | Ecall )
1189
+ n .Diag |= n .Left .Diag
1188
1190
l := n .Left
1189
1191
1190
1192
if l .Op == ONAME {
1191
- r := unsafenmagic (n )
1192
- if r != nil {
1193
+ if r := unsafenmagic (n ); r != nil {
1193
1194
if n .Isddd {
1194
1195
yyerror ("invalid use of ... with builtin %v" , l )
1195
1196
}
1196
1197
n = r
1197
1198
n = typecheck1 (n , top )
1198
1199
return n
1199
1200
}
1200
- }
1201
1201
1202
- n .Left = typecheck (n .Left , Erv | Etype | Ecall )
1203
- n .Diag |= n .Left .Diag
1204
- l = n .Left
1205
- if l .Op == ONAME && l .Etype != 0 {
1206
- // TODO(marvin): Fix Node.EType type union.
1207
- if n .Isddd && Op (l .Etype ) != OAPPEND {
1208
- yyerror ("invalid use of ... with builtin %v" , l )
1209
- }
1202
+ if l .Etype != 0 {
1203
+ // TODO(marvin): Fix Node.EType type union.
1204
+ if n .Isddd && Op (l .Etype ) != OAPPEND {
1205
+ yyerror ("invalid use of ... with builtin %v" , l )
1206
+ }
1210
1207
1211
- // builtin: OLEN, OCAP, etc.
1212
- // TODO(marvin): Fix Node.EType type union.
1213
- n .Op = Op (l .Etype )
1208
+ // builtin: OLEN, OCAP, etc.
1209
+ // TODO(marvin): Fix Node.EType type union.
1210
+ n .Op = Op (l .Etype )
1214
1211
1215
- n .Left = n .Right
1216
- n .Right = nil
1217
- n = typecheck1 (n , top )
1218
- return n
1212
+ n .Left = n .Right
1213
+ n .Right = nil
1214
+ n = typecheck1 (n , top )
1215
+ return n
1216
+ }
1219
1217
}
1220
1218
1221
1219
n .Left = defaultlit (n .Left , nil )
Original file line number Diff line number Diff line change
1
+ // compile
2
+
3
+ // Copyright 2016 The Go Authors. All rights reserved.
4
+ // Use of this source code is governed by a BSD-style
5
+ // license that can be found in the LICENSE file.
6
+
7
+ package p
8
+
9
+ import "unsafe"
10
+
11
+ const _ = (unsafe .Sizeof )(0 )
You can’t perform that action at this time.
0 commit comments