Boost logo

Boost :

Subject: Re: [boost] [optional] Strict Aliasing Warnings on Trunk
From: Scott McMurray ([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, gregod at, cpdaniel at, john at