Public bug reported: Binary package hint: gcc-4.4
Compiling the attached testcase should produce a warning, as it does with g++ 4.3.2 (at least with -O or above), $ g++-4.3 -Wall -Wextra -pedantic -ansi -O3 hi.cpp /usr/include/bits/stdio2.h: In function ‘int main()’: /usr/include/bits/stdio2.h:105: warning: ‘hi.array<double, 4>::a[1]’ is used uninitialized in this function hi.cpp:29: note: ‘hi.array<double, 4>::a[1]’ was declared here $ On g++ 4.4.1, however, the compiler produces no warning, $ g++ -Wall -Wextra -pedantic -ansi -O3 hi.cpp $ $ g++ -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-1ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.1 (Ubuntu 4.4.1-1ubuntu3) ** Affects: gcc-4.4 (Ubuntu) Importance: Undecided Status: New -- Uninitialized variable usage warning broken https://bugs.launchpad.net/bugs/420129 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs