Ion Gaztanaga wrote:
If the distance is equal to the raw values ...
It is equal:
bash-2.03$ aCC -I./boost -DNN=10 x.cpp && a.out
4 44
44
bash-2.03$ aCC -I./boost -DNN=20 x.cpp && a.out
4 84
84
bash-2.03$ aCC -I./boost -DNN=10 +DD64 x.cpp && a.out
8 88
88
bash-2.03$ aCC -I./boost -DNN=20 +DD64 x.cpp && a.out
8 168
168
bash-2.03$
x.cpp
-----
#include <iostream>
#include
Boris Gubenko wrote:
Ion Gaztanaga wrote:
P.S.: I'm not sure if EDG-based compilers and HP compiler work because I don't have such compilers. If someone wants to help on those, I would be glad.
Below are the results on HP-UX/ia64 in 32- and 64-bit pointer mode using the program posted by Zeljko Vrba.
The compiler on HP-UX/ia64 is EDG-based so checking both __HP_aCC and __EDG_VERSION__ in boost/intrusive/detail/parent_from_member.hpp is reduntant.
bash-2.03$ aCC -V aCC: HP C/aC++ B3910B A.06.14 [Feb 22 2007] bash-2.03$ aCC -I./boost -DNN=10 x.cpp && a.out 4 44 bash-2.03$ aCC -I./boost -DNN=20 x.cpp && a.out 4 84 bash-2.03$ aCC -I./boost -DNN=10 +DD64 x.cpp && a.out 8 88 bash-2.03$ aCC -I./boost -DNN=20 +DD64 x.cpp && a.out 8 168 bash-2.03$
So it seems that the compiler aligns the hook to 4 bytes:
void *data_[NN]; //4*NN bytes char ch_; //1 byte plus alignment
so the trick used to extract the offset in parent_from_member function is adequate. But the regression tests for Intrusive with HP aCC:
http://engineering.meta-comm.com/boost-regression/CVS-HEAD/developer/intrusi...
seems to fail in tests using member hooks. A bit strange. Can you check the real distance between members with something like:
int main(void) { using std::cout; using std::endl; klass k; cout << ((char*)k.hook_ - (char*)k) << endl; return 0; }
If the distance is equal to the raw values extracted from the pointer to data member, then regression test failures might be provoked by another library bug.
Regards,
Ion _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users