https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #56 from CVS Commits ---
The trunk branch has been updated by Marek Polacek :
https://gcc.gnu.org/g:4b1d3d8d732bea86c7b2aba46c2a437461020824
commit r12-5479-g4b1d3d8d732bea86c7b2aba46c2a437461020824
Author: Marek Polacek
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #55 from Marek Polacek ---
Aah, I should check is_empty_class before issuing the warning I guess.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #54 from Jonathan Wakely ---
Looks like it's missing a check for m_alloc having vacuous initialization, i.e.
not actually needing any initialization before it's usable.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #53 from David Binderman ---
I am not sure if this belongs here or in a separate bug report,
but given this code:
class AllocatorWithCleanup {
public:
int *allocate(int, void *);
};
class SecBlock {
SecBlock() :
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #52 from David Binderman ---
(In reply to Marek Polacek from comment #51)
> At last, implemented.
Marvellous.
I will test it by compiling Fedora rawhide and report back
with any errors.
Nearly 17 years is quite a wait for a fix.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Marek Polacek changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #50 from CVS Commits ---
The trunk branch has been updated by Marek Polacek :
https://gcc.gnu.org/g:0790c8aacdfb4fd096aa580dae0fe49172c43ab2
commit r12-5391-g0790c8aacdfb4fd096aa580dae0fe49172c43ab2
Author: Marek Polacek
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #49 from Marek Polacek ---
Patch resurrected for GCC 12:
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583544.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Marek Polacek changed:
What|Removed |Added
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Marek Polacek changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Marek Polacek changed:
What|Removed |Added
CC||smuccione at agisent dot com
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Manuel López-Ibáñez changed:
What|Removed |Added
CC||Hi-Angel at yandex dot ru
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Eric Gallager changed:
What|Removed |Added
CC||msebor at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #44 from Richard Biener ---
(In reply to Jason Merrill from comment #40)
> (In reply to Richard Biener from comment #39)
> > so - how do I make X::X used and thus prevail? It looks like it doesn't
> > really exist
>
> True, for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Manuel López-Ibáñez changed:
What|Removed |Added
Keywords||patch
--- Comment #43 from Manuel
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #42 from Roger Weber ---
I posted the latest duplicate of this bug, and I don't know anything about how
gcc works. I am very grateful for the hard work you guys put into this, but
just looking at the data. This bug was first reported
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #41 from Manuel López-Ibáñez ---
All these cases can be handled perfectly by the FE and there's a patch
above.
Why complicate it by expecting the ME to understand C++ mem-initializer
semantics?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #40 from Jason Merrill ---
(In reply to Richard Biener from comment #39)
> so - how do I make X::X used and thus prevail? It looks like it doesn't
> really exist
True, for C++14 and up, "X x{};" does aggregate initialization rather
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #39 from Richard Biener ---
(In reply to Jason Merrill from comment #38)
> (In reply to Jonathan Wakely from comment #37)
>
> If you add a
>
> Y y{};
>
> GCC warns about the Y constructor.
>
> We don't warn about the implicit X
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Jason Merrill changed:
What|Removed |Added
CC||rguenth at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #37 from Jonathan Wakely ---
N.B. we should also warn using uninitialized members in default member
initializers, e.g. both of these should produce a warning:
struct X {
int x1 = x2;
int x2 = 0;
};
X x{}; // causes definition
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Jonathan Wakely changed:
What|Removed |Added
CC||roger at rankedgaming dot com
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Manuel López-Ibáñez changed:
What|Removed |Added
CC||s-beyer at gmx dot net
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #34 from Manuel López-Ibáñez ---
(In reply to Richard Biener from comment #33)
> I have a fix for PR2972 and it also correctly handles this case so why is it
> "conceptually different"?
Because to detect uninitialized member usage
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #33 from Richard Biener ---
(In reply to Manuel López-Ibáñez from comment #32)
> (In reply to Richard Biener from comment #31)
> > This is really a dup of PR2972.
> >
> > *** This bug has been marked as a duplicate of bug 2972 ***
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Manuel López-Ibáñez changed:
What|Removed |Added
Status|RESOLVED|NEW
Resolution|DUPLICATE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Richard Biener changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Manuel López-Ibáñez changed:
What|Removed |Added
CC||matt at godbolt dot org
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Anthony Brandon changed:
What|Removed |Added
Attachment #36706|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #28 from Manuel López-Ibáñez ---
Hi Anthony, adding testcases to the patch will help clarify what is working and
what you expect to work but it isn't:
https://gcc.gnu.org/wiki/HowToPrepareATestcase
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #27 from Anthony Brandon ---
Created attachment 36706
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36706=edit
First version of patch for PR19808
This is the current version of my patch.
It still needs some work.
The
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Manuel López-Ibáñez manu at gcc dot gnu.org changed:
What|Removed |Added
CC||dcb314 at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #25 from Anthony Brandon anthony.brandon at gmail dot com ---
Never mind the second question, I found walk_tree.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Anthony Brandon anthony.brandon at gmail dot com changed:
What|Removed |Added
CC|
34 matches
Mail list logo