summaryrefslogtreecommitdiffstats
path: root/src/H5detect.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-09-12 19:39:16 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-09-12 19:39:16 (GMT)
commit93e661f16ba03b2acca208fb16518e6ce26e86d8 (patch)
tree65d81102c018e950c8bf30ba07186d10ed4e8b32 /src/H5detect.c
parentc78c580f5cb64abd8bf33331f11ef666382741cb (diff)
downloadhdf5-93e661f16ba03b2acca208fb16518e6ce26e86d8.zip
hdf5-93e661f16ba03b2acca208fb16518e6ce26e86d8.tar.gz
hdf5-93e661f16ba03b2acca208fb16518e6ce26e86d8.tar.bz2
[svn-r11395] Purpose: Bug fix
Description: Quincey added the condition branch (else if (*((ST*)S) != (ST)((DT)(*((ST*)S))))) in the definition of the macro H5T_CONV_Fx_CORE. It handles a special situation when the source is "float" and assigned the value of "INT_MAX". Compilers do roundup making this value "INT_MAX+1". This branch is to check that situation and return exception for some compilers, mainly GCC. The branch if (*((ST*)S) > (DT)(D_MAX) || (S_PREC < D_PREC && *((ST*)S) == (DT)(D_MAX))) is for some compilers like Sun, HP, IBM, and SGI where under the same situation the "int" doesn't overflow. A test was added to dt_arith.c to check 2 conversions, from float to int where the float is INT_MAX, and from double to signed char where the double is SCHAR_MAX. Platforms tested: h5committest and fuss.
Diffstat (limited to 'src/H5detect.c')
0 files changed, 0 insertions, 0 deletions