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
8bce3b56
Commit
8bce3b56
authored
Dec 09, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug127
R=r OCL=20874 CL=20874
parent
436fcc68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
src/cmd/gc/const.c
src/cmd/gc/const.c
+10
-3
No files found.
src/cmd/gc/const.c
View file @
8bce3b56
...
...
@@ -67,7 +67,7 @@ convlit(Node *n, Type *t)
break
;
if
(
et
==
TINTER
)
break
;
return
;
goto
bad1
;
case
Wlitstr
:
if
(
isnilinter
(
t
))
{
...
...
@@ -212,6 +212,7 @@ evconst(Node *n)
case
Wlitfloat
:
case
Wlitbool
:
case
Wlitstr
:
case
Wlitnil
:
break
;
}
...
...
@@ -228,6 +229,7 @@ evconst(Node *n)
case
Wlitfloat
:
case
Wlitbool
:
case
Wlitstr
:
case
Wlitnil
:
break
;
}
...
...
@@ -246,7 +248,7 @@ evconst(Node *n)
nl
->
val
.
ctype
=
CTFLT
;
wl
=
whatis
(
nl
);
}
else
{
yyerror
(
"illegal combination of literals %O %
E, %E
"
,
n
->
op
,
wl
,
wr
);
yyerror
(
"illegal combination of literals %O %
W, %W
"
,
n
->
op
,
wl
,
wr
);
return
;
}
}
...
...
@@ -264,7 +266,7 @@ evconst(Node *n)
switch
(
TUP
(
n
->
op
,
wl
))
{
default:
yyerror
(
"illegal literal %O %
E
"
,
n
->
op
,
wl
);
yyerror
(
"illegal literal %O %
W
"
,
n
->
op
,
wl
);
return
;
case
TUP
(
OADD
,
Wlitint
):
...
...
@@ -312,6 +314,11 @@ evconst(Node *n)
mpdivfltflt
(
fval
,
nr
->
val
.
u
.
fval
);
break
;
case
TUP
(
OEQ
,
Wlitnil
):
goto
settrue
;
case
TUP
(
ONE
,
Wlitnil
):
goto
setfalse
;
case
TUP
(
OEQ
,
Wlitint
):
if
(
mpcmpfixfix
(
xval
,
nr
->
val
.
u
.
xval
)
==
0
)
goto
settrue
;
...
...
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