[C++-sig] Boost.Python, AIX, and gcc

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Wed Nov 5 04:54:52 CET 2003


--- "J. Michael Owen" <mikeowen at llnl.gov> wrote:
> OK -- here's the test.  It's about as simple as it can be.  :)

Thanks for the test! Unfortunately it does not fail to compile on the
Macintosh. I am able to reproduce the old failure that prompted me to add the
#ifdef in type_with_alignment.hpp, but in the exact same environment compiling
your code succeeds. So my idea that we can use your test to give Doug a clue
did not work out :(

Before I added the #ifdef I found out that the PowerPC does not have strict
alignment requirements. So the worst consequence of the failure to find a
proper alignment is (maybe?) a performance hit. What is the situation on our
AIX machine? Does unaligned access cause a crash? Does the following run?

#include <iostream>

int main(void)
{
  char buf[2*sizeof(double)];
  for(int i=0;i<sizeof(double);i++) {
    double* d = (double*) &buf[i];
    *d = 120.+i;
    std::cout << *d << std::endl;
  }
}

If this runs extending the #ifdef for your platform would seem acceptable to
me.

Ralf


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree




More information about the Cplusplus-sig mailing list