This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
It think one can test it in configure along these linesThe change could be improved if a check were added to configure to test the capability of strtod and friends to handle nan, inf and infinity. However, it's not clear to me how to do this except by hard coding the result.
a = strtod ("nan", NULL); if(a == a) abort();
a = strtod("+inf", NULL); if(a != a || a != a + 1.0 || a < 0.0) abort();
a = strtod("-inf", NULL); if(a != a || a != a - 1.0 || a > 0.0) abort();
(The disadvantage of a run test is of cause that it does not work if you build for a target which is different from your system used for building gcc.)
case "${target}" in hppa*-*-hpux*) have_broken_isnan=yes ;; *) have_broken_isnan=no ;; esac
case "${target}" in *mingw*) have_crlf=yes ;; *) have_crlf=no;; esac
Besides, I somehow fear that your current version is rather slow for big ascii files. (It is not uncommon to read relatively large ascii files with data in numerics.)
-- François-Xavier Coudert http://www.homepages.ucl.ac.uk/~uccafco/
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |