Uninitialized variable usage warning broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-4.4 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
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/
/usr/
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-
--with-
--enable-
--enable-multiarch --enable-
--libexecdir=
--with-
--enable-
--disable-werror --with-arch-32=i486 --with-tune=generic
--enable-
--target=
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-1ubuntu3)
It seems that this is an Ubuntu-specific bug. It was originally reported in the gcc bugzilla as #41135 (http:// gcc.gnu. org/bugzilla/ show_bug. cgi?id= 41135).