
19 Dec
2009
19 Dec
'09
7:24 a.m.
2009/12/19 Patrick Horgan <phorgan1@gmail.com>:
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.