]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
coroutines : Avoid a C++11ism.
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 4 Mar 2021 08:41:06 +0000 (08:41 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Mon, 15 Mar 2021 16:27:27 +0000 (16:27 +0000)
The master version of the code uses a defaulted CTOR, which had
been inadvertently backported to gcc-10.  Fixed thus.

gcc/cp/ChangeLog:

* coroutines.cc (struct var_nest_node): Provide a default
CTOR.

gcc/cp/coroutines.cc

index 9133f024434bc3ac24e399fdb5dd56e9010cdc5c..4902d1a4c4fb549cbdee8a006dc6b2972ec39909 100644 (file)
@@ -2697,7 +2697,9 @@ find_interesting_subtree (tree *expr_p, int *dosub, void *d)
 
 struct var_nest_node
 {
-  var_nest_node () = default;
+  var_nest_node ()
+    : var(NULL_TREE), init(NULL_TREE),
+      prev(NULL), next(NULL), then_cl(NULL), else_cl(NULL) {}
   var_nest_node (tree v, tree i, var_nest_node *p, var_nest_node *n)
     : var(v), init(i), prev(p), next(n)
     {