Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2007-10-28 15:38:29


on Sun Oct 28 2007, Vladimir Prus <ghost-AT-cs.msu.su> wrote:

> On Saturday 27 October 2007 06:21:22 Boris Gubenko wrote:
>> Index: build.jam
>> ===================================================================
>> --- build.jam   (revision 40483)
>> +++ build.jam   (working copy)
>> @@ -175,7 +175,7 @@
>>      : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
>>  ## GCC 2.x, 3.x, 4.x
>>  toolset gcc gcc : "-o " : -D
>> -    : -pedantic
>> +    : -pedantic -fno-strict-aliasing
>>      [ opt --release : [ opt --symbols : -g : -s ] -O3 ]
>>      [ opt --debug : -g -O0 -fno-inline ]
>>      -I$(--python-include) -I$(--extra-include) -Wno-long-long
>
> Rene,
>
> given that we have no idea if this gcc bug, or some subtle standard
> violation on jam part, and how to workaround it property, can we
> just apply this patch?
>
> This gcc 4.2 issue is recurring problem on IRC.

It's *highly* likely that it's a problem in jam. 'C' code routinely
uses pointer type-punning with the assumption that the compiler
doesn't care, but the compiler implements optimizations based on the
rule that (with a few exceptions) two pointers of different types
cannot point into the same memory block.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk