aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-05-17 12:26:19 +0100
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:03:35 -0300
commit44b3f52ae7517e2d694c950e657b4ef2c9e5a9d2 (patch)
treef27f382de6448ed05b50942d2b3a465d5fdad4df /gcc
parentc295d4c52f79b6d94ca3421c6d1d583ebc346679 (diff)
downloadgcc-44b3f52ae7517e2d694c950e657b4ef2c9e5a9d2.zip
gcc-44b3f52ae7517e2d694c950e657b4ef2c9e5a9d2.tar.gz
gcc-44b3f52ae7517e2d694c950e657b4ef2c9e5a9d2.tar.bz2
coroutines: Avoid a maybe used uninitialized warning. NFC.
This avoids a (bogus) warning that occurs with some bootstrap compilers. gcc/cp/ChangeLog: 2020-05-17 Iain Sandoe <iain@sandoe.co.uk> * coroutines.cc (morph_fn_to_coro): Initialize the gro variable.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/coroutines.cc3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7ac074a..65fc644 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2020-05-17 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc (morph_fn_to_coro): Initialize the gro variable.
+
2020-05-16 Iain Sandoe <iain@sandoe.co.uk>
* coroutines.cc (finish_co_return_stmt): Implement rules
diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc
index facfafa..4cbc0e0 100644
--- a/gcc/cp/coroutines.cc
+++ b/gcc/cp/coroutines.cc
@@ -4285,7 +4285,8 @@ morph_fn_to_coro (tree orig, tree *resumer, tree *destroyer)
tree gro_context_body = push_stmt_list ();
bool gro_is_void_p = VOID_TYPE_P (TREE_TYPE (get_ro));
- tree gro, gro_bind_vars = NULL_TREE;
+ tree gro = NULL_TREE;
+ tree gro_bind_vars = NULL_TREE;
/* We have to sequence the call to get_return_object before initial
suspend. */
if (gro_is_void_p)