User account creation filtered due to spam.

Bug 42905 - G++ 4.5.0 doesn't warn about an uninitialized class member
Summary: G++ 4.5.0 doesn't warn about an uninitialized class member
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2010-01-30 03:04 UTC by Dmitry Gorbachev
Modified: 2010-01-30 10:37 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.3.3 4.4.3
Known to fail:
Last reconfirmed:


Attachments
Testcase (85 bytes, text/plain)
2010-01-30 03:08 UTC, Dmitry Gorbachev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Gorbachev 2010-01-30 03:04:47 UTC
 
Comment 1 Dmitry Gorbachev 2010-01-30 03:08:27 UTC
Created attachment 19758 [details]
Testcase

g++ -O -Wuninitialized -S 1.cc

Older g++s issue a warning:

pr42905.cc: In function ‘void f()’:
pr42905.cc:5: warning: ‘s.S::i’ is used uninitialized in this function
pr42905.cc:11: note: ‘s.S::i’ was declared here
Comment 2 Dmitry Gorbachev 2010-01-30 03:13:11 UTC
(In reply to comment #1)

Sorry, it should be pr42905.cc, not 1.cc
Comment 3 Richard Biener 2010-01-30 10:37:23 UTC
It's optimized away before giving us a chance to warn about it.  Such is life.