This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70246] Spurious -Wmaybe-uninitialized warnings with -O1
- From: "michael at jarvis dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Mar 2016 01:43:41 +0000
- Subject: [Bug c++/70246] Spurious -Wmaybe-uninitialized warnings with -O1
- Auto-submitted: auto-generated
- References: <bug-70246-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70246
--- Comment #4 from Mike Jarvis <michael at jarvis dot net> ---
Created attachment 37984
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37984&action=edit
An alternate source that uses a custom Complex class
OK, here is a version that rolls its own Complex class, rather than using the
standard library's complex<double>. I stripped out the parts of that that
aren't relevant for this, so hopefully this is small enough for you.
A possible clue is that the warning goes away if Complex is implemented in
terms of double _x and double _y (as the normal template version of
std::complex does) rather than __complex__ double _z (as the specialization
std::complex<double> does).