summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-15 19:09:27 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-15 19:09:27 +0000
commit96eced216d6e34f1404c9222124d2f6723c0d70c (patch)
tree09c7d56df5e7852774bb3a461cda54ed55c02121 /fixincludes
parente57bcbd387e30f5c7ce2b02eff7255360029d21c (diff)
downloadgcc-96eced216d6e34f1404c9222124d2f6723c0d70c.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104315 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog8
-rw-r--r--fixincludes/fixincl.x158
-rw-r--r--fixincludes/inclhack.def48
-rw-r--r--fixincludes/tests/base/bits/huge_val.h27
4 files changed, 234 insertions, 7 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index fad54a9c81d..a01267debe1 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,11 @@
+2005-09-15 Joseph S. Myers <joseph@codesourcery.com>
+
+ 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.
+
2005-08-14 Kelley Cook <kcook@gcc.gnu.org>
* All files: Update with new FSF address.
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 5203a4347f9..ae1cda2e823 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Friday June 24, 2005 at 01:40:52 PM EDT
+ * It has been AutoGen-ed Thursday September 15, 2005 at 06:55:23 PM UTC
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT CVS-MERGE THIS FILE, EITHER Fri Jun 24 13:40:52 EDT 2005
+/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Sep 15 18:55:24 UTC 2005
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 190 fixup descriptions.
+ * This file contains 193 fixup descriptions.
*
* See README for more information.
*
@@ -36,8 +36,8 @@
* You should have received a copy of the GNU General Public License
* along with inclhack. See the file "COPYING". If not,
* write to: The Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ * 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2913,6 +2913,132 @@ static const char* apzHpux_SystimePatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Huge_Val_Hex fix
+ */
+tSCC zHuge_Val_HexName[] =
+ "huge_val_hex";
+
+/*
+ * File name selection pattern
+ */
+tSCC zHuge_Val_HexList[] =
+ "|bits/huge_val.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzHuge_Val_HexMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zHuge_Val_HexSelect0[] =
+ "^#[ \t]*define[ \t]*HUGE_VAL[ \t].*0x1\\.0p.*";
+
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zHuge_Val_HexBypass0[] =
+ "__builtin_huge_val";
+
+#define HUGE_VAL_HEX_TEST_CT 2
+static tTestDesc aHuge_Val_HexTests[] = {
+ { TT_NEGREP, zHuge_Val_HexBypass0, (regex_t*)NULL },
+ { TT_EGREP, zHuge_Val_HexSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Huge_Val_Hex
+ */
+static const char* apzHuge_Val_HexPatch[] = {
+ "format",
+ "#define HUGE_VAL (__builtin_huge_val())\n",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Huge_Valf_Hex fix
+ */
+tSCC zHuge_Valf_HexName[] =
+ "huge_valf_hex";
+
+/*
+ * File name selection pattern
+ */
+tSCC zHuge_Valf_HexList[] =
+ "|bits/huge_val.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzHuge_Valf_HexMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zHuge_Valf_HexSelect0[] =
+ "^#[ \t]*define[ \t]*HUGE_VALF[ \t].*0x1\\.0p.*";
+
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zHuge_Valf_HexBypass0[] =
+ "__builtin_huge_valf";
+
+#define HUGE_VALF_HEX_TEST_CT 2
+static tTestDesc aHuge_Valf_HexTests[] = {
+ { TT_NEGREP, zHuge_Valf_HexBypass0, (regex_t*)NULL },
+ { TT_EGREP, zHuge_Valf_HexSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Huge_Valf_Hex
+ */
+static const char* apzHuge_Valf_HexPatch[] = {
+ "format",
+ "#define HUGE_VALF (__builtin_huge_valf())\n",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Huge_Vall_Hex fix
+ */
+tSCC zHuge_Vall_HexName[] =
+ "huge_vall_hex";
+
+/*
+ * File name selection pattern
+ */
+tSCC zHuge_Vall_HexList[] =
+ "|bits/huge_val.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzHuge_Vall_HexMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zHuge_Vall_HexSelect0[] =
+ "^#[ \t]*define[ \t]*HUGE_VALL[ \t].*0x1\\.0p.*";
+
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zHuge_Vall_HexBypass0[] =
+ "__builtin_huge_vall";
+
+#define HUGE_VALL_HEX_TEST_CT 2
+static tTestDesc aHuge_Vall_HexTests[] = {
+ { TT_NEGREP, zHuge_Vall_HexBypass0, (regex_t*)NULL },
+ { TT_EGREP, zHuge_Vall_HexSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Huge_Vall_Hex
+ */
+static const char* apzHuge_Vall_HexPatch[] = {
+ "format",
+ "#define HUGE_VALL (__builtin_huge_vall())\n",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Int_Abort_Free_And_Exit fix
*/
tSCC zInt_Abort_Free_And_ExitName[] =
@@ -7722,9 +7848,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 229
+#define REGEX_COUNT 235
#define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT 190
+#define FIX_COUNT 193
/*
* Enumerate the fixes
@@ -7798,6 +7924,9 @@ typedef enum {
HPUX_HTONL_FIXIDX,
HPUX_LONG_DOUBLE_FIXIDX,
HPUX_SYSTIME_FIXIDX,
+ HUGE_VAL_HEX_FIXIDX,
+ HUGE_VALF_HEX_FIXIDX,
+ HUGE_VALL_HEX_FIXIDX,
INT_ABORT_FREE_AND_EXIT_FIXIDX,
IO_QUOTES_DEF_FIXIDX,
IO_QUOTES_USE_FIXIDX,
@@ -8263,6 +8392,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux_SystimeTests, apzHpux_SystimePatch, 0 },
+ { zHuge_Val_HexName, zHuge_Val_HexList,
+ apzHuge_Val_HexMachs,
+ HUGE_VAL_HEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aHuge_Val_HexTests, apzHuge_Val_HexPatch, 0 },
+
+ { zHuge_Valf_HexName, zHuge_Valf_HexList,
+ apzHuge_Valf_HexMachs,
+ HUGE_VALF_HEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aHuge_Valf_HexTests, apzHuge_Valf_HexPatch, 0 },
+
+ { zHuge_Vall_HexName, zHuge_Vall_HexList,
+ apzHuge_Vall_HexMachs,
+ HUGE_VALL_HEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aHuge_Vall_HexTests, apzHuge_Vall_HexPatch, 0 },
+
{ zInt_Abort_Free_And_ExitName, zInt_Abort_Free_And_ExitList,
apzInt_Abort_Free_And_ExitMachs,
INT_ABORT_FREE_AND_EXIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 2ff588719b7..3cfb3e099e3 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 = {
diff --git a/fixincludes/tests/base/bits/huge_val.h b/fixincludes/tests/base/bits/huge_val.h
new file mode 100644
index 00000000000..f8bb0495b9d
--- /dev/null
+++ b/fixincludes/tests/base/bits/huge_val.h
@@ -0,0 +1,27 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/bits/huge_val.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( HUGE_VAL_HEX_CHECK )
+#define HUGE_VAL (__builtin_huge_val())
+
+#endif /* HUGE_VAL_HEX_CHECK */
+
+
+#if defined( HUGE_VALF_HEX_CHECK )
+#define HUGE_VALF (__builtin_huge_valf())
+
+#endif /* HUGE_VALF_HEX_CHECK */
+
+
+#if defined( HUGE_VALL_HEX_CHECK )
+#define HUGE_VALL (__builtin_huge_vall())
+
+#endif /* HUGE_VALL_HEX_CHECK */