On Thu, Nov 12, 2009 at 12:33 AM, Michael Droettboom <[email protected]> wrote: > Thanks. Behind that, however, it runs into this compiler shortcoming: > > cc: build/src.solaris-2.8-sun4u-2.5/numpy/core/src/npymath/npy_math.c > "numpy/core/src/npymath/npy_math_private.h", line 229: invalid type for > bit-field: manh > "numpy/core/src/npymath/npy_math_private.h", line 230: invalid type for > bit-field: manl > > It seems that Sun compilers (before Sun Studio 12, C compiler 5.9), > don't support bit fields larger than 32-bits. Welcome to my world :)
Damn... > > The best solution I've been able to dream up is to use a macro to get at > the manh bitfield on these older compilers. This fix does seem to pass > the "test_umath.py" unit tests. It's not as clean as the bit-field > method, but it should be more portable. I think it is the only solution, actually. Actually, I wanted to use bit mask at first, because I thought bitfield was a C99 feature, not supported by MS compilers (although it actually is). > Can you think of a better solution? If this is *the* solution, we may > want to add getters/setters for all the members (sign, exp, manl) and > fix nextafterl in terms of those, just for consistency. I will implement this, but I would prefer using this method everywhere for every compiler, it would be more robust. David _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
