aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-12-22 13:50:18 -0800
committerIan Lance Taylor <iant@golang.org>2020-12-22 14:46:58 -0800
commit7b89979747684476c371208a274c77ec9e402caf (patch)
treed98c4d020eca0b8209a52f787146bc652130e736 /gcc
parent313890530c53475f2b76c4cae0d69b9b73de648c (diff)
downloadgcc-7b89979747684476c371208a274c77ec9e402caf.zip
gcc-7b89979747684476c371208a274c77ec9e402caf.tar.gz
gcc-7b89979747684476c371208a274c77ec9e402caf.tar.bz2
compiler: initialize saw_send_stmt locals
The C++ compiler wasn't warning because we take their address. Fixes golang/go#43252 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/279752
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/parse.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index c70b60c..e67aa36 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-d091cd25a5894ac751fe1868197648fc486cf322
+013a4ddcae2e8b840561c4411bab87f4f0f9ef42
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc
index 3b2e5a7..1664fe3 100644
--- a/gcc/go/gofrontend/parse.cc
+++ b/gcc/go/gofrontend/parse.cc
@@ -4491,7 +4491,7 @@ Parse::switch_stat(Label* label)
bool saw_simple_stat = false;
Expression* switch_val = NULL;
- bool saw_send_stmt;
+ bool saw_send_stmt = false;
Type_switch type_switch;
bool have_type_switch_block = false;
if (this->simple_stat_may_start_here())
@@ -5326,7 +5326,7 @@ Parse::for_stat(Label* label)
{
// We might be looking at a Condition, an InitStat, or a
// RangeClause.
- bool saw_send_stmt;
+ bool saw_send_stmt = false;
cond = this->simple_stat(false, &saw_send_stmt, &range_clause, NULL);
if (!this->peek_token()->is_op(OPERATOR_SEMICOLON))
{