public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ?
@ 2021-03-16 11:35 dcb314 at hotmail dot com
2021-03-16 12:25 ` [Bug c++/99617] " marxin at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2021-03-16 11:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99617
Bug ID: 99617
Summary: gcc/cp/coroutines.cc:2807: member variables not
initialised in constructor ?
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
cppcheck says:
trunk.git/gcc/cp/coroutines.cc:2807:3: warning: Member variable
'var_nest_node::else_cl' is not initialized in the constructor.
[uninitMemberVar]
trunk.git/gcc/cp/coroutines.cc:2807:3: warning: Member variable
'var_nest_node::then_cl' is not initialized in the constructor.
[uninitMemberVar]
Source code is
var_nest_node (tree v, tree i, var_nest_node *p, var_nest_node *n)
: var(v), init(i), prev(p), next(n)
{
if (p)
p->next = this;
if (n)
n->prev = this;
}
Maybe NULL would be a good first initialisation ?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/99617] gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ?
2021-03-16 11:35 [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ? dcb314 at hotmail dot com
@ 2021-03-16 12:25 ` marxin at gcc dot gnu.org
2021-03-16 12:30 ` iains at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-03-16 12:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99617
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
Last reconfirmed| |2021-03-16
CC| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
I'm going to handle it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/99617] gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ?
2021-03-16 11:35 [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ? dcb314 at hotmail dot com
2021-03-16 12:25 ` [Bug c++/99617] " marxin at gcc dot gnu.org
@ 2021-03-16 12:30 ` iains at gcc dot gnu.org
2021-03-16 12:34 ` marxin at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: iains at gcc dot gnu.org @ 2021-03-16 12:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99617
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #1)
> I'm going to handle it.
actually, I was already on it .. but if you want to...
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/99617] gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ?
2021-03-16 11:35 [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ? dcb314 at hotmail dot com
2021-03-16 12:25 ` [Bug c++/99617] " marxin at gcc dot gnu.org
2021-03-16 12:30 ` iains at gcc dot gnu.org
@ 2021-03-16 12:34 ` marxin at gcc dot gnu.org
2021-03-16 12:38 ` iains at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-03-16 12:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99617
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #2)
> (In reply to Martin Liška from comment #1)
> > I'm going to handle it.
>
> actually, I was already on it .. but if you want to...
I have a patch with changelog done.
Do we want it for GCC 11, or in the next stage1?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/99617] gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ?
2021-03-16 11:35 [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ? dcb314 at hotmail dot com
` (2 preceding siblings ...)
2021-03-16 12:34 ` marxin at gcc dot gnu.org
@ 2021-03-16 12:38 ` iains at gcc dot gnu.org
2021-03-16 12:41 ` iains at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: iains at gcc dot gnu.org @ 2021-03-16 12:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99617
--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #3)
> (In reply to Iain Sandoe from comment #2)
> > (In reply to Martin Liška from comment #1)
> > > I'm going to handle it.
> >
> > actually, I was already on it .. but if you want to...
>
> I have a patch with changelog done.
> Do we want it for GCC 11, or in the next stage1?
I guess if we consider it to be wrong code, it should be in 11 (and is clearly
local to coroutines).
otherwise, yeah, next stage 1 (unless I need to touch that area for other open
bugs).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/99617] gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ?
2021-03-16 11:35 [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ? dcb314 at hotmail dot com
` (3 preceding siblings ...)
2021-03-16 12:38 ` iains at gcc dot gnu.org
@ 2021-03-16 12:41 ` iains at gcc dot gnu.org
2021-03-17 19:27 ` iains at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: iains at gcc dot gnu.org @ 2021-03-16 12:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99617
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #4)
> (In reply to Martin Liška from comment #3)
> > (In reply to Iain Sandoe from comment #2)
> > > (In reply to Martin Liška from comment #1)
> > I have a patch with changelog done.
> > Do we want it for GCC 11, or in the next stage1?
>
> I guess if we consider it to be wrong code, it should be in 11 (and is
> clearly local to coroutines).
(but I don't at the moment think that any open bug with wrong code is caused
directly by the omission of those initialisers.)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/99617] gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ?
2021-03-16 11:35 [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ? dcb314 at hotmail dot com
` (4 preceding siblings ...)
2021-03-16 12:41 ` iains at gcc dot gnu.org
@ 2021-03-17 19:27 ` iains at gcc dot gnu.org
2021-03-18 9:43 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: iains at gcc dot gnu.org @ 2021-03-17 19:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99617
--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
given that it blocks something else and that the fix is obvious, trivial and
confined to the coroutines implementation - my vote would be to make it.
(I do expect to touch that code if I have a chance to fix the remaining
coroutines bugs so, if not applied now, then I'll pick it up at that point).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/99617] gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ?
2021-03-16 11:35 [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ? dcb314 at hotmail dot com
` (5 preceding siblings ...)
2021-03-17 19:27 ` iains at gcc dot gnu.org
@ 2021-03-18 9:43 ` cvs-commit at gcc dot gnu.org
2021-03-18 9:44 ` marxin at gcc dot gnu.org
2021-10-03 19:28 ` cvs-commit at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-18 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99617
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:
https://gcc.gnu.org/g:3bcf19215d88e6ec33d283352c52005f02dbc784
commit r11-7712-g3bcf19215d88e6ec33d283352c52005f02dbc784
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 16 13:26:09 2021 +0100
coroutines: init struct members to NULL
gcc/cp/ChangeLog:
PR c++/99617
* coroutines.cc (struct var_nest_node): Init then_cl and else_cl
to NULL.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/99617] gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ?
2021-03-16 11:35 [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ? dcb314 at hotmail dot com
` (6 preceding siblings ...)
2021-03-18 9:43 ` cvs-commit at gcc dot gnu.org
@ 2021-03-18 9:44 ` marxin at gcc dot gnu.org
2021-10-03 19:28 ` cvs-commit at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-03-18 9:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99617
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
Pushed, it's fixed now.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/99617] gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ?
2021-03-16 11:35 [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ? dcb314 at hotmail dot com
` (7 preceding siblings ...)
2021-03-18 9:44 ` marxin at gcc dot gnu.org
@ 2021-10-03 19:28 ` cvs-commit at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-03 19:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99617
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:
https://gcc.gnu.org/g:6bc4823dc4264dfec956cb559ed8f9d78cac2b0a
commit r10-10162-g6bc4823dc4264dfec956cb559ed8f9d78cac2b0a
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 16 13:26:09 2021 +0100
coroutines: init struct members to NULL
gcc/cp/ChangeLog:
PR c++/99617
* coroutines.cc (struct var_nest_node): Init then_cl and else_cl
to NULL.
(cherry picked from commit 3bcf19215d88e6ec33d283352c52005f02dbc784)
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-10-03 19:28 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 11:35 [Bug c++/99617] New: gcc/cp/coroutines.cc:2807: member variables not initialised in constructor ? dcb314 at hotmail dot com
2021-03-16 12:25 ` [Bug c++/99617] " marxin at gcc dot gnu.org
2021-03-16 12:30 ` iains at gcc dot gnu.org
2021-03-16 12:34 ` marxin at gcc dot gnu.org
2021-03-16 12:38 ` iains at gcc dot gnu.org
2021-03-16 12:41 ` iains at gcc dot gnu.org
2021-03-17 19:27 ` iains at gcc dot gnu.org
2021-03-18 9:43 ` cvs-commit at gcc dot gnu.org
2021-03-18 9:44 ` marxin at gcc dot gnu.org
2021-10-03 19:28 ` cvs-commit at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).