Bug 531483

Summary: boost::optional warning: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
Product: [Fedora] Fedora Reporter: Caolan McNamara <caolanm>
Component: boostAssignee: Benjamin Kosnik <bkoz>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: bkoz, jakub, mnewsome, pmachata
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-15 11:15:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
This is quite possibly a totally incorrect fix, but its based off the aligned_storage.hpp impl mentioned in optional.hpp's header and it does silence the warnings
none
sample source none

Description Caolan McNamara 2009-10-28 14:44:04 UTC
Created attachment 366447 [details]
This is quite possibly a totally incorrect fix, but its based off the aligned_storage.hpp impl mentioned in optional.hpp's header and it does silence the warnings

Description of problem:
Warnings when using boost::optional with -fstrict-aliasing

Version-Release number of selected component (if applicable):
boost-1.39.0-8.fc12.x86_64

How reproducible:
100%

Steps to Reproduce:
1. g++ -Wstrict-aliasing -O2 -c test.cpp
  
Actual results:
test.cpp: In function ‘bool bar()’:
test.cpp:14: warning: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
test.cpp:14: note: initialized from here

Expected results:
No warnings

Additional info:
Some discussion here: http://lists.boost.org/Archives/boost/2009/05/151305.php

Comment 1 Caolan McNamara 2009-10-28 14:45:14 UTC
Created attachment 366448 [details]
sample source

Comment 2 Noura El hawary 2009-11-16 15:43:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Caolan McNamara 2010-07-15 11:15:07 UTC
This was fixed with gcc 4.5 as found in F-14, gcc issue not boost.