projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5ba6ad
)
Fix type of discarded send expression.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 3 Mar 2011 01:17:34 +0000
(
01:17
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 3 Mar 2011 01:17:34 +0000
(
01:17
+0000)
From-SVN: r170634
gcc/go/gofrontend/expressions.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/expressions.cc
b/gcc/go/gofrontend/expressions.cc
index ee486ffb27a79d5b3107e7a1785b05ad25774330..a45e7acc247bbcfa5d7eaf4c87af68d21fb6c2f6 100644
(file)
--- a/
gcc/go/gofrontend/expressions.cc
+++ b/
gcc/go/gofrontend/expressions.cc
@@
-12321,7
+12321,10
@@
Send_expression::do_traverse(Traverse* traverse)
Type*
Send_expression::do_type()
{
- return Type::lookup_bool_type();
+ if (this->is_value_discarded_)
+ return Type::make_void_type();
+ else
+ return Type::lookup_bool_type();
}
// Set types.