This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/42643] "may be used uninitialized" compiled with "-Wall -O"


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

--- Comment #2 from mi+gcc at aldan dot algebra.com 2012-01-06 20:08:54 UTC ---
Created attachment 26259
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26259
Live test case (file from Mozilla's NSS package)

Even when using gcc-4.6 (more specifically gcc version 4.6.3 20111104
(prerelease) (FreeBSD Ports Collection)), I still get a bogus warning on the
attached file, unless the optimization level is at -O3 AND the -fPIC is not
specified:

mi@narawntapu:nss/lib/util (1778) gcc46 -Wall -O3 -c nssb64e.i
mi@narawntapu:nss/lib/util (1779) gcc46 -Wall -O2 -c nssb64e.i
nssb64e.i: In function 'NSSBase64_EncodeItem_Util':
nssb64e.i:3239:15: warning: 'out_len' may be used uninitialized in this
function [-Wuninitialized]
mi@narawntapu:nss/lib/util (1780) gcc46 -Wall -O3 -fPIC -c nssb64e.i
nssb64e.i: In function 'NSSBase64_EncodeItem_Util':
nssb64e.i:3239:15: warning: 'out_len' may be used uninitialized in this
function [-Wuninitialized]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]