|
Boost : |
Subject: Re: [boost] [optional] Strict Aliasing Warnings on Trunk
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-12-17 08:47:25
Dean Michael Berris wrote:
> I've recently been seeing this error more and more especially on GCC with -Wall:
>
> /home/dean/boost/boost/optional/optional.hpp:407: warning:
> dereferencing pointer <anonymous> does break strict-aliasing rules
> /home/dean/boost/boost/optional/optional.hpp:427: note: initialized from here
>
> and:
>
> /home/dean/boost/boost/function/function_base.hpp:321: warning:
> dereferencing type-punned pointer will break strict-aliasing rules
> /home/dean/boost/boost/function/function_base.hpp:325: warning:
> dereferencing type-punned pointer will break strict-aliasing rules
>
> This is on Linux and GCC 4.4.1.
>
> I'm not an expert in this regard but is there a way to either silence
> or avoid these warnings? Anything you want me to try from my end?
This was discussed in the past, and some people claimed the warning was
spurious.
I am personally not convinced whether it is spurious or not, however.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk