Boost logo

Boost Users :

Subject: Re: [Boost-users] regex __sync_fetch_and_add_4 issue when compiling to 32 bit Linux
From: Ákos Maróy (akos_at_[hidden])
Date: 2011-01-20 12:27:11


Peter,

> Indeed. Can you examine boost/smart_ptr/detail/sp_counted_base.hpp and
> see what's different between 1.44 and 1.45? It should pick the following:
>
> #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined(
> __x86_64__ ) )
> # include <boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp>
>
> on either x86 and x64, any idea why it doesn't with -m32? Is __i386__
> not defined?

it seems not:

$ cat sample.cxx
#include <boost/smart_ptr.hpp>

#if defined __i386___
#error __i386__ defined
#endif

int main(void) {
    boost::shared_ptr<int> p;

    return 0;
}

$ g++ -m32 -march=i386 -o sample sample.cxx

(goes down fine)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net