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
8211d03c
Commit
8211d03c
authored
Dec 23, 2010
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash asking for type of invalid const.
From-SVN: r168194
parent
bf0a2edc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
gcc/go/gofrontend/expressions.cc
+13
-0
gcc/go/gofrontend/expressions.h
+1
-2
No files found.
gcc/go/gofrontend/expressions.cc
View file @
8211d03c
...
...
@@ -894,6 +894,19 @@ Expression::make_type(Type* type, source_location location)
return
new
Type_expression
(
type
,
location
);
}
// Class Parser_expression.
Type
*
Parser_expression
::
do_type
()
{
// We should never really ask for the type of a Parser_expression.
// However, it can happen, at least when we have an invalid const
// whose initializer refers to the const itself. In that case we
// may ask for the type when lowering the const itself.
gcc_assert
(
saw_errors
());
return
Type
::
make_error_type
();
}
// Class Var_expression.
// Lower a variable expression. Here we just make sure that the
...
...
gcc/go/gofrontend/expressions.h
View file @
8211d03c
...
...
@@ -873,8 +873,7 @@ class Parser_expression : public Expression
do_lower
(
Gogo
*
,
Named_object
*
,
int
)
=
0
;
Type
*
do_type
()
{
gcc_unreachable
();
}
do_type
();
void
do_determine_type
(
const
Type_context
*
)
...
...
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