From 77923c29383974626f7eb30cb69abb20db3cb2bc Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 15 Sep 2005 20:09:27 +0100 Subject: 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 --- fixincludes/inclhack.def | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'fixincludes/inclhack.def') 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 = { -- cgit v1.1