Boost logo

Boost :

Subject: Re: [boost] gcc-4.4.0 and boost::optional is giving (spurious?) strict-aliasing warnings
From: Matthew L. Creech (mlcreech_at_[hidden])
Date: 2009-05-06 11:57:24

On Wed, May 6, 2009 at 11:08 AM, Mathias Gaunard
<mathias.gaunard_at_[hidden]> wrote:
> Does it affect boost::variant too?

Yes, it does for me:

In member function 'virtual int CTrendThread::wait_for_events()':
warning: dereferencing pointer '<anonymous>' does break
strict-aliasing rules
note: initialized from here

this is triggered by a call to boost::apply_visitor. I tried a couple
of simpler test cases with no problems, though.

GCC 4.4.0, compiling w/ "-Os -Wall -std=c++0x"
Boost 1.39

Matthew L. Creech

Boost list run by bdawes at, gregod at, cpdaniel at, john at