Boost logo

Boost :

Subject: Re: [boost] [1.41.0] [spirit] [serialisation] Beta 1 releasecandidate
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2009-11-04 07:33:31


> More strict aliasing warnings, this time from spirit:
>
> ./boost/spirit/home/classic/core/scanner/scanner.hpp:132: warning:
> dereferencing pointer 'val' does break strict-aliasing rules
>
> Again, this is normally a bug once optimizations are turned on.

It's the first time I'm seeing this problem in Spirit. We need to
investigate this more closely as the warning comes from a template function
(and 'val' is a template parameter), so I assume the issue is in the code
using Spirit. What file produces this diagnostic?

> There are also a lot of warnings from Serialization relating to use of
> deprecated spirit headers - is there a #define that can be set to
> suppress
> these - or a better fix? We don't really want to see them in the
> library
> build IMO:
>
> ./boost/spirit/core/non_terminal/rule.hpp:18:4: warning: #warning "This
> header is deprecated. Please use:
> boost/spirit/include/classic_rule.hpp"

This one is easy, just change the included header to the one suggested by
the warning. If things need to be unchanged you will need to

    #define BOOST_SPIRIT_USE_OLD_NAMESPACE

as well before including any headers from Spirit.

But it would be better to touch the code using spirit. Everything referenced
from boost::spirit needs to be referenced from boost::spirit::classic after
including the new file (and if the #define is _not_ used). But I guess it's
too late for this change now.

And just for the records, this warning is in place since Boost V1.38, so I
really wonder why the code has not been changed yet.

Regards Hartmut

-------------------
Meet me at BoostCon
http://boostcon.com


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