Iain Sandoe <i...@sandoe.co.uk> wrote: > Jason Merrill <ja...@redhat.com> wrote: > >> I notice this patch includes >> >> + var_nest_node () = default; >> >> which will break GCC 10 bootstrap with a C++98 compiler; we only >> switched to C++11 for GCC 11. > > Hmm, the patch was already backported… > … I will fix this. > > I missed the warning during testing.
We set -std=gnu++98 for the stage1 compiler, which does warn about this (although there is a lot of warning output from a bootstrap, it’s easy to miss one). I’m mostly bootstrapping with GCC-7.5 and it appears that this does not actually produce any error even if one actually uses the defaulted ctor (at least in a trivial test). = anyway …. OK for gcc-10? this removes the warning from the stage #1. thanks Iain ========== [PATCH] coroutines : Avoid a C++11ism. 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 9133f024434..4902d1a4c4f 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -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) { -- 2.24.1