Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
60ff8cc8
Commit
60ff8cc8
authored
Oct 20, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address bug193 and add note to spec about it.
R=ken OCL=35920 CL=35920
parent
02fd255a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
11 deletions
+13
-11
doc/go_spec.html
doc/go_spec.html
+1
-0
src/cmd/gc/const.c
src/cmd/gc/const.c
+2
-2
src/cmd/gc/subr.c
src/cmd/gc/subr.c
+4
-3
src/cmd/gc/typecheck.c
src/cmd/gc/typecheck.c
+1
-1
test/bugs/placeholder
test/bugs/placeholder
+2
-0
test/fixedbugs/bug193.go
test/fixedbugs/bug193.go
+0
-0
test/golden.out
test/golden.out
+0
-3
test/run
test/run
+3
-2
No files found.
doc/go_spec.html
View file @
60ff8cc8
...
...
@@ -9,6 +9,7 @@ Todo
(struct{T} vs struct {T T} vs struct {t T})
[ ] need explicit language about the result type of operations
[ ] may want to have some examples for the types of shift operations
[ ] should string(1<<s) and float(1<<s) be valid?
[ ] should probably write something about evaluation order of statements even
though obvious
[ ] specify iteration direction for range clause
...
...
src/cmd/gc/const.c
View file @
60ff8cc8
...
...
@@ -96,7 +96,7 @@ convlit1(Node **np, Type *t, int explicit)
break
;
case
OLSH
:
case
ORSH
:
convlit
(
&
n
->
left
,
t
);
convlit
1
(
&
n
->
left
,
t
,
explici
t
);
t
=
n
->
left
->
type
;
if
(
t
!=
T
&&
!
isint
[
t
->
etype
])
{
yyerror
(
"invalid operation: %#N (shift of type %T)"
,
n
,
t
);
...
...
@@ -292,7 +292,7 @@ tostr(Val v)
case
CTFLT
:
yyerror
(
"no float -> string"
);
case
CTNIL
:
memset
(
&
v
,
0
,
sizeof
v
);
v
.
ctype
=
CTSTR
;
...
...
src/cmd/gc/subr.c
View file @
60ff8cc8
...
...
@@ -1455,11 +1455,12 @@ Zconv(Fmt *fp)
s
+=
chartorune
(
&
r
,
s
);
switch
(
r
)
{
default:
if
(
r
<
' '
)
{
fmtprint
(
fp
,
"
\\
x%02x"
,
r
);
break
;
}
fmtrune
(
fp
,
r
);
break
;
case
'\0'
:
fmtstrcpy
(
fp
,
"
\\
x00"
);
break
;
case
'\t'
:
fmtstrcpy
(
fp
,
"
\\
t"
);
break
;
...
...
src/cmd/gc/typecheck.c
View file @
60ff8cc8
...
...
@@ -765,7 +765,7 @@ reswitch:
doconv:
ok
|=
Erv
;
typecheck
(
&
n
->
left
,
Erv
|
(
top
&
Eindir
));
defaultlit
(
&
n
->
left
,
n
->
type
);
convlit1
(
&
n
->
left
,
n
->
type
,
1
);
if
((
t
=
n
->
left
->
type
)
==
T
||
n
->
type
==
T
)
goto
error
;
n
=
typecheckconv
(
n
,
n
->
left
,
n
->
type
,
1
);
...
...
test/bugs/placeholder
0 → 100644
View file @
60ff8cc8
This file keeps Mercurial from deleting the directory
when there are no known bugs.
test/bugs/bug193.go
→
test/
fixed
bugs/bug193.go
View file @
60ff8cc8
File moved
test/golden.out
View file @
60ff8cc8
...
...
@@ -201,6 +201,3 @@ throw: interface conversion
panic PC=xxx
== bugs/
=========== bugs/bug193.go
BUG: errchk: bugs/bug193.go:14: missing expected error: 'shift'
test/run
View file @
60ff8cc8
...
...
@@ -47,7 +47,7 @@ for dir in . ken chan interface nilptr fixedbugs bugs
do
echo
echo
'=='
$dir
'/'
for
i
in
$
dir
/
*
.go
for
i
in
$
(
ls
$dir
/
*
.go 2>/dev/null
)
do
export
F
=
$(
basename
$i
.go
)
export
D
=
$dir
...
...
@@ -75,8 +75,9 @@ done | # clean up some stack noise
egrep
-v
'^(r[0-9a-z]+|[cfg]s) +0x'
|
sed
'/tmp.*Bus error/s/.*Bus/Bus/; /tmp.*Trace.BPT/s/.*Trace/Trace/
s!'
$RUNFILE
'!$RUNFILE!g
s/
PC=0x[0-9a-f]*/ PC=
xxx/
s/
^PC=0x[0-9a-f]*/pc:
xxx/
s/^pc: 0x[0-9a-f]*/pc: xxx/
s/PC=0x[0-9a-f]*/PC=xxx/
/^Trace\/breakpoint trap/d
/^Trace\/BPT trap/d
/RUNFILE/ s/line 1: *[0-9]*/line 1: PID/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment