Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
3a24b265
Commit
3a24b265
authored
Dec 12, 2013
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Tweak untyped nil error message.
From-SVN: r205941
parent
1635eab3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
gcc/go/gofrontend/expressions.cc
+9
-2
No files found.
gcc/go/gofrontend/expressions.cc
View file @
3a24b265
...
...
@@ -7310,7 +7310,11 @@ Builtin_call_expression::do_lower(Gogo* gogo, Named_object* function,
Type
*
slice_type
=
args
->
front
()
->
type
();
if
(
!
slice_type
->
is_slice_type
())
{
error_at
(
args
->
front
()
->
location
(),
"argument 1 must be a slice"
);
if
(
slice_type
->
is_nil_type
())
error_at
(
args
->
front
()
->
location
(),
"use of untyped nil"
);
else
error_at
(
args
->
front
()
->
location
(),
"argument 1 must be a slice"
);
this
->
set_is_error
();
return
this
;
}
...
...
@@ -8008,7 +8012,10 @@ Builtin_call_expression::do_type()
const
Expression_list
*
args
=
this
->
args
();
if
(
args
==
NULL
||
args
->
empty
())
return
Type
::
make_error_type
();
return
args
->
front
()
->
type
();
Type
*
ret
=
args
->
front
()
->
type
();
if
(
!
ret
->
is_slice_type
())
return
Type
::
make_error_type
();
return
ret
;
}
case
BUILTIN_REAL
:
...
...
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