I isolated part of the DETECT_F into a C program as attached (detect.c). It only contains the algorithm for detecting the byte order of long double. When I compile it with gcc -g, -O0, or no flag, it reports little-endian. When I compile it with -O1, -O2, or -O3, it reports VAX order. I don't know where goes wrong yet. But I suspect GCC's optimization has bugs. Maybe you can help me. I haven't tried the algorithms for other parts in DETECT_F yet. The alignment problem you talked about is one of the other algorithms. Ray |
detect.c
Description: Binary data
On Sep 4, 2013, at 8:40 PM, Andrea Bedini wrote:
|
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
