aboutsummaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2008-05-24 20:52:00 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2008-05-24 20:52:00 +0000
commit7de4b37ef1574e4311f34c5ea7d268670d7471ef (patch)
tree51eb02b5ead105592be1a27adb6046ca20e87c0c /fixincludes
parentc36c98215e53eb99725fa5bb187aa7b3ac4c22f7 (diff)
downloadgcc-7de4b37ef1574e4311f34c5ea7d268670d7471ef.zip
gcc-7de4b37ef1574e4311f34c5ea7d268670d7471ef.tar.gz
gcc-7de4b37ef1574e4311f34c5ea7d268670d7471ef.tar.bz2
inclhack.def (solaris_math_4): Use GCC's __builtin_fpclassify.
* inclhack.def (solaris_math_4): Use GCC's __builtin_fpclassify. * tests/base/iso/math_c99.h: Update. * fixincl.x: Regenerate. From-SVN: r135852
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog6
-rw-r--r--fixincludes/fixincl.x36
-rw-r--r--fixincludes/inclhack.def11
-rw-r--r--fixincludes/tests/base/iso/math_c99.h11
4 files changed, 24 insertions, 40 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 3f7e991..6f45df3 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * inclhack.def (solaris_math_4): Use GCC's __builtin_fpclassify.
+ * tests/base/iso/math_c99.h: Update.
+ * fixincl.x: Regenerate.
+
2008-05-14 Joseph Myers <joseph@codesourcery.com>
* inclhack.def (AAB_fd_zero_asm_posix_types_h): Bypass on
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 4d5c8c0..f9786e0 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 Wednesday May 14, 2008 at 03:12:47 PM UTC
+ * It has been AutoGen-ed Friday May 23, 2008 at 06:50:18 PM CEST
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Wed May 14 15:12:47 UTC 2008
+/* DO NOT SVN-MERGE THIS FILE, EITHER Fri May 23 18:50:18 CEST 2008
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -22,18 +22,23 @@
* inclhack copyright (c) 1998, 1999, 2000, 2001
* The Free Software Foundation, Inc.
*
- * inclhack is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * inclhack is free software.
*
- * inclhack is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * inclhack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with inclhack. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -5842,16 +5847,7 @@ static tTestDesc aSolaris_Math_4Tests[] = {
static const char* apzSolaris_Math_4Patch[] = {
"format",
"#define\tfpclassify(x) \\\n\
- __extension__ ({ const __typeof(x) __x_fp = (x); \\\n\
-\t\t isnan(__x_fp) \\\n\
-\t\t ? FP_NAN \\\n\
-\t\t : isinf(__x_fp) \\\n\
-\t\t ? FP_INFINITE \\\n\
-\t\t : isnormal(__x_fp) \\\n\
-\t\t\t ? FP_NORMAL \\\n\
-\t\t\t : __x_fp == 0.0 \\\n\
-\t\t\t ? FP_ZERO \\\n\
-\t\t\t : FP_SUBNORMAL; })",
+ __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, (x))",
"^#define[ \t]+fpclassify\\(x\\)[ \t]+__builtin_fpclassify\\(x\\)",
(char*)NULL };
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index a64566e..6c21cb1 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -3205,16 +3205,7 @@ fix = {
files = iso/math_c99.h;
c_fix = format;
c_fix_arg = "#define\tfpclassify(x) \\\n"
- " __extension__ ({ const __typeof(x) __x_fp = (x); \\\n"
- "\t\t isnan(__x_fp) \\\n"
- "\t\t ? FP_NAN \\\n"
- "\t\t : isinf(__x_fp) \\\n"
- "\t\t ? FP_INFINITE \\\n"
- "\t\t : isnormal(__x_fp) \\\n"
- "\t\t\t ? FP_NORMAL \\\n"
- "\t\t\t : __x_fp == 0.0 \\\n"
- "\t\t\t ? FP_ZERO \\\n"
- "\t\t\t : FP_SUBNORMAL; })";
+ " __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, (x))";
c_fix_arg = "^#define[ \t]+fpclassify\\(x\\)[ \t]+__builtin_fpclassify\\(x\\)";
test_text =
'#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
diff --git a/fixincludes/tests/base/iso/math_c99.h b/fixincludes/tests/base/iso/math_c99.h
index e3b2799..4d9b631 100644
--- a/fixincludes/tests/base/iso/math_c99.h
+++ b/fixincludes/tests/base/iso/math_c99.h
@@ -38,16 +38,7 @@
#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
#undef fpclassify
#define fpclassify(x) \
- __extension__ ({ const __typeof(x) __x_fp = (x); \
- isnan(__x_fp) \
- ? FP_NAN \
- : isinf(__x_fp) \
- ? FP_INFINITE \
- : isnormal(__x_fp) \
- ? FP_NORMAL \
- : __x_fp == 0.0 \
- ? FP_ZERO \
- : FP_SUBNORMAL; })
+ __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, (x))
#endif /* SOLARIS_MATH_4_CHECK */