Your message dated Sat, 18 Jun 2016 00:52:54 +0200
with message-id <[email protected]>
and subject line closing bugs reported against ancient GCC versions
has caused the Debian Bug report #461789,
regarding Confusing error about uninitialized values.
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
461789: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461789
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: g++-4.3
Version: 4.3-20080116-1
Severity: minor
Obviously we want our compilers to be smart, but I think g++-4.3 is
too smart for me. ;-)
In the attached file, compiling with -Wall and -O2 produces a warning:
foo.cc: In function ‘int main(int, char**)’:
foo.cc:30: warning: ‘tmp.foo::real_foo’ is used uninitialized in this function
foo.cc:36: note: ‘tmp.foo::real_foo’ was declared here
This is rather confusing, since lines 30 and 36 aren't even in the
same function! The code looks right to me, but I'm willing to believe
that there's a subtle problem I don't see. g++ needs to report it in a
more obvious way, though. (of course, it could be an outright bug in
g++, but that seems like a slim possibility)
I've seen this problem twice now, both times in the destructor of a
smart pointer class. But the same classes are used without any trouble
in lots of other places in my code, so I'm not quite sure what's going
on. Maybe I just get lucky everywhere else?
Daniel
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-3-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages g++-4.3 depends on:
ii gcc-4.3 4.3-20080116-1 The GNU C compiler
ii gcc-4.3-base 4.3-20080116-1 The GNU Compiler Collection (base
ii libc6 2.7-6 GNU C Library: Shared libraries
ii libgmp3c2 2:4.2.2+dfsg-1 Multiprecision arithmetic library
ii libmpfr1ldbl 2.3.0.dfsg.1-2 multiple precision floating-point
ii libstdc++6-4.3-dev 4.3-20080116-1 The GNU Standard C++ Library v3 (d
g++-4.3 recommends no packages.
-- no debconf information
#include <string>
class foo
{
class impl;
impl *real_foo;
foo();
public:
foo(const std::string &prefix);
~foo();
};
class foo::impl
{
public:
impl();
~impl();
void bar();
};
inline foo::foo(const std::string &prefix)
: real_foo(new impl)
{
}
inline foo::~foo()
{
real_foo->bar();
}
int main(int argc, char **argv)
{
foo tmp("foo");
return 0;
}
--- End Message ---
--- Begin Message ---
This bug has been reported against an ancient version of
gpc (4.1), gcc/g++/gfortran (4.3), or gcj/gij/gobjc (4.4), that was last
released with Debian 6.0 (squeeze). But even squeeze-lts has now reached
end-of-life and is no longer supported.
The bug is assumed to be fixed (or no longer relevant) in newer GCC
releases and therefore I'm closing this report now. If the problem is
still reproducible in the currently supported versions (gcc-5, gcc-6 or
corresponding g++/gcj), feel free to provide more information, reopen
and reassign this bug report.
Andreas
--- End Message ---