Boost logo

Boost :

Subject: Re: [boost] [optional] Strict Aliasing Warnings on Trunk
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2009-12-19 02:24:51


2009/12/19 Patrick Horgan <phorgan1_at_[hidden]>:
>
> Yep, with 4.4.1 and with 4.5 and -Wall, and optimization, or alternatively
> with -fstrict-aliasing -Wstrict-aliasing=3 the following code had no
> warnings at all with boost-trunk:
>
>   return *boost::optional<char>('c');
>

Try it with something other than char -- reading through a char* is
one of the exceptions to the strict aliasing rules.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk