diff options
author | Joseph Myers <joseph@codesourcery.com> | 2005-09-15 20:09:27 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2005-09-15 20:09:27 +0100 |
commit | 77923c29383974626f7eb30cb69abb20db3cb2bc (patch) | |
tree | 09c7d56df5e7852774bb3a461cda54ed55c02121 /fixincludes/inclhack.def | |
parent | 451e92db80435a2f60aa2483b29647ba4931d7f4 (diff) | |
download | gcc-77923c29383974626f7eb30cb69abb20db3cb2bc.zip gcc-77923c29383974626f7eb30cb69abb20db3cb2bc.tar.gz gcc-77923c29383974626f7eb30cb69abb20db3cb2bc.tar.bz2 |
re PR target/23139 (-pedantic -ffast-math breaks working code)
fixincludes:
PR c++/23139
* inclhack.def (huge_val_hex, huge_valf_hex, huge_vall_hex): New
fixes.
* fixincl.x: Regenerate.
* tests/base/bits/huge_val.h: New file.
gcc/testsuite:
* g++.dg/warn/huge-val1.C: New test.
From-SVN: r104315
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 2ff5887..3cfb3e0 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -1681,6 +1681,54 @@ fix = { /* + * Fix glibc definition of HUGE_VAL in terms of hex floating point constant + */ +fix = { + hackname = huge_val_hex; + files = bits/huge_val.h; + select = "^#[ \t]*define[ \t]*HUGE_VAL[ \t].*0x1\\.0p.*"; + bypass = "__builtin_huge_val"; + + c_fix = format; + c_fix_arg = "#define HUGE_VAL (__builtin_huge_val())\n"; + + test_text = "# define HUGE_VAL\t(__extension__ 0x1.0p2047)"; +}; + + +/* + * Fix glibc definition of HUGE_VALF in terms of hex floating point constant + */ +fix = { + hackname = huge_valf_hex; + files = bits/huge_val.h; + select = "^#[ \t]*define[ \t]*HUGE_VALF[ \t].*0x1\\.0p.*"; + bypass = "__builtin_huge_valf"; + + c_fix = format; + c_fix_arg = "#define HUGE_VALF (__builtin_huge_valf())\n"; + + test_text = "# define HUGE_VALF (__extension__ 0x1.0p255f)"; +}; + + +/* + * Fix glibc definition of HUGE_VALL in terms of hex floating point constant + */ +fix = { + hackname = huge_vall_hex; + files = bits/huge_val.h; + select = "^#[ \t]*define[ \t]*HUGE_VALL[ \t].*0x1\\.0p.*"; + bypass = "__builtin_huge_vall"; + + c_fix = format; + c_fix_arg = "#define HUGE_VALL (__builtin_huge_vall())\n"; + + test_text = "# define HUGE_VALL (__extension__ 0x1.0p32767L)"; +}; + + +/* * Fix return type of abort and free */ fix = { |