Bug 676361 - warning: ‘*((void*)& aNewItem +8)’ may be used uninitialized in this function
Summary: warning: ‘*((void*)& aNewItem +8)’ may be used uninitialized in this function
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-09 16:12 UTC by Caolan McNamara
Modified: 2011-02-10 15:05 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-02-10 15:05:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
preprocessed source (442.37 KB, application/octet-stream)
2011-02-09 16:12 UTC, Caolan McNamara
no flags Details
unprocessed source (1014 bytes, text/plain)
2011-02-09 16:12 UTC, Caolan McNamara
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 47679 0 None None None Never

Description Caolan McNamara 2011-02-09 16:12:00 UTC
Created attachment 477849 [details]
preprocessed source

Description of problem:
mysterious warning with -DNDEBUG, -Wall using boost::optional 

Version-Release number of selected component (if applicable):
gcc-4.6.0-0.6.fc15.x86_64

How reproducible:
100%

Steps to Reproduce:
1. g++ -c -O2 -Wall -DNDEBUG foo.cxx
or
2. g++ -c -O2 -Wall foo.ii
  
Actual results:
foo.cxx:47:9: warning: ‘*((void*)& aNewItem +8)’ may be used uninitialized in this function [-Wuninitialized]

Expected results:
Either no warning, or a better line location to indicate where the error lies.

Additional info:
Couple of other very similar examples included in the foo.cxx don't trigger the warning and gcc 4.5.X didn't warn about this.

Comment 1 Caolan McNamara 2011-02-09 16:12:22 UTC
Created attachment 477850 [details]
unprocessed source

Comment 2 Jakub Jelinek 2011-02-10 15:05:01 UTC
Tracking upstream as PR47679.


Note You need to log in before you can comment on or make changes to this bug.