
OvermindDL1 wrote:
On Wed, Nov 4, 2009 at 1:24 AM, Norbert Wenzel
wrote: I'm currently parsing some data using Spirit together with boost::bind to set the callbacks for Spirit. In release build I get a compiler (gcc 4.4.1) warning from bind: warning: dereferencing pointer ‘val’ does break strict-aliasing rules
Not sure what is causing the problem, do you have a reduced test-case we can see?
I could reduce the test case so much, that there was no warning anymore. I can only reproduce the warning when using the bjam configuration, that also builds my project. Copying the g++ parameters from the bjam build and using them directly, does not make gcc issue any warnings. So I guess the problem is anywhere in my build configuration, but not in the code.
Also, two things. 1) You *really* should be posting this to the Spirit mailing list instead, will get faster responses and from knowledgeable people. Sorry, I didn't know about the Spirit specific list. Next time the questions will go there.
2) You *really* should be using Spirit.Qi, not Spirit.Classic. Your grammar's will be much shorter, much faster, and much easier. Maybe I should give it a try, but I was simply finding more tutorials faster for the classic version.
Thanks for your help. Norbert