public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43163]  New: gcc doesn't report uninitialized member variables
@ 2010-02-24 12:05 bart dot vanassche at gmail dot com
  2010-02-24 12:06 ` [Bug c++/43163] " bart dot vanassche at gmail dot com
  2010-02-24 12:46 ` [Bug c++/43163] g++ " manu at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: bart dot vanassche at gmail dot com @ 2010-02-24 12:05 UTC (permalink / raw)
  To: gcc-bugs

Output produced by the attached test program (as you can see, gcc doesn't warn
about initializing member variable m1 with the value of the uninitialized
member variable m2):

$ g++ -Wall -o uninitialized-member-variable uninitialized-member-variable.cpp
&& ./uninitialized-member-variable
a.m1 = 1629547062

$ gcc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with:
/gnu/gcc/releases/packaging/4.3.4-3/gcc4-4.3.4-3/src/gcc-4.3.4/configure
--srcdir=/gnu/gcc/releases/packaging/4.3.4-3/gcc4-4.3.4-3/src/gcc-4.3.4
--prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var
--sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man
--datadir=/usr/share --infodir=/usr/share/info --mandir=/usr/share/man -v
--with-gmp=/usr --with-mpfr=/usr --enable-bootstrap
--enable-version-specific-runtime-libs --with-slibdir=/usr/bin
--libexecdir=/usr/lib --enable-static --enable-shared --enable-shared-libgcc
--disable-__cxa_atexit --with-gnu-ld --with-gnu-as --with-dwarf2
--disable-sjlj-exceptions
--enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --disable-symvers
--enable-libjava --program-suffix=-4 --enable-libgomp --enable-libssp
--enable-libada --enable-threads=posix --with-arch=i686 --with-tune=generic
--enable-libgcj-sublibs CC=gcc-4 CXX=g++-4 CC_FOR_TARGET=gcc-4
CXX_FOR_TARGET=g++-4 GNATMAKE_FOR_TARGET=gnatmake GNATBIND_FOR_TARGET=gnatbind
AS=/opt/gcc-tools/bin/as.exe AS_FOR_TARGET=/opt/gcc-tools/bin/as.exe
LD=/opt/gcc-tools/bin/ld.exe LD_FOR_TARGET=/opt/gcc-tools/bin/ld.exe
--with-ecj-jar=/usr/share/java/ecj.jar
Thread model: posix
gcc version 4.3.4 20090804 (release) 1 (GCC)


-- 
           Summary: gcc doesn't report uninitialized member variables
           Product: gcc
           Version: 4.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bart dot vanassche at gmail dot com
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43163


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/43163] gcc doesn't report uninitialized member variables
  2010-02-24 12:05 [Bug c++/43163] New: gcc doesn't report uninitialized member variables bart dot vanassche at gmail dot com
@ 2010-02-24 12:06 ` bart dot vanassche at gmail dot com
  2010-02-24 12:46 ` [Bug c++/43163] g++ " manu at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: bart dot vanassche at gmail dot com @ 2010-02-24 12:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bart dot vanassche at gmail dot com  2010-02-24 12:06 -------
Created an attachment (id=19945)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19945&action=view)
uninitialized-member-variable.cpp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43163


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/43163] g++ doesn't report uninitialized member variables
  2010-02-24 12:05 [Bug c++/43163] New: gcc doesn't report uninitialized member variables bart dot vanassche at gmail dot com
  2010-02-24 12:06 ` [Bug c++/43163] " bart dot vanassche at gmail dot com
@ 2010-02-24 12:46 ` manu at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-24 12:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from manu at gcc dot gnu dot org  2010-02-24 12:46 -------
OK. Now I see that this is exactly the same as PR 19808, which was not on my
list. Thanks for the report.


*** This bug has been marked as a duplicate of 19808 ***


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43163


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-24 12:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-24 12:05 [Bug c++/43163] New: gcc doesn't report uninitialized member variables bart dot vanassche at gmail dot com
2010-02-24 12:06 ` [Bug c++/43163] " bart dot vanassche at gmail dot com
2010-02-24 12:46 ` [Bug c++/43163] g++ " manu at gcc dot gnu dot 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).