|
Boost : |
Subject: Re: [boost] [optional] Strict Aliasing Warnings on Trunk
From: Patrick Horgan (phorgan1_at_[hidden])
Date: 2009-12-18 16:11:16
Peter Dimov wrote:
> Felipe Magno de Almeida wrote:
>
>>>> IMO we should be using static_cast<T2*>(static_cast<void*>(x)) which
>>>> is not implementation-defined.
>
> This is, by the way, what optional does. Apparently, it isn't enough
> to avoid the warning.
And it's really frustrating too. I use optional from the trunk for
simple things in a small test program, and get no warnings at all even
in programs where I do stupid programming tricks to get gcc to winge
about strict aliasing on other lines so that I know I have the compile
options right. I can't get gcc to complain about optional in my program
at all, even trying different values of -Wstrict-aliasing, but building
boost-trunk I see it.
Patrick
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk