summaryrefslogtreecommitdiff
path: root/gcc/enquire.c
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-20 13:01:37 +0000
committerRichard Stallman <rms@gnu.org>1993-05-20 13:01:37 +0000
commit5b59d75766cead8697ec6c6ac32190e8b4918b6b (patch)
tree02f93f69ed19cbccb2102f746c24a93291178970 /gcc/enquire.c
parent99977c6183dddfda94f56de3d32316105bc1e152 (diff)
downloadgcc-5b59d75766cead8697ec6c6ac32190e8b4918b6b.tar.gz
(F_check): Check NO_LONG_DOUBLE_IO.
From-SVN: r4518
Diffstat (limited to 'gcc/enquire.c')
-rw-r--r--gcc/enquire.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/enquire.c b/gcc/enquire.c
index 037dc1e47f4..ff9f5b63ea9 100644
--- a/gcc/enquire.c
+++ b/gcc/enquire.c
@@ -26,6 +26,8 @@
(fake_f_rep): Clear all of u, initially. Make the ints in u unsigned.
(f_define): Use ordinary constants for long double
if it's same width as double. Make __convert_long_double_i unsigned.
+ Richard Stallman, May 93:
+ In F_check, check NO_LONG_DOUBLE_IO.
COMPILING
With luck and a following wind, just the following will work:
@@ -2146,13 +2148,19 @@ Procedure F_check(precision, val1) int precision; Long_double val1; {
that sscanf read the number back identically. Harsh yes, but
sometimes you've got to be cruel to be kind.
*/
- Long_double new1;
Number val, new, diff;
double rem;
int e;
char *rep;
char *f2;
+#ifdef NO_LONG_DOUBLE_IO
+ double new1;
+ /* On the Sun 3, sscanf clobbers 4 words,
+ which leads to a crash when this function tries to return. */
+ f2= "%le"; /* Input */
+#else
+ Long_double new1;
if (sizeof(double) == sizeof(Long_double)) {
/* Assume they're the same, and use non-stdc format */
/* This is for stdc compilers using non-stdc libraries */
@@ -2161,6 +2169,7 @@ Procedure F_check(precision, val1) int precision; Long_double val1; {
/* It had better support Le then */
f2= "%Le";
}
+#endif
val= val1;
rep= f_rep(precision, (Long_double) val);
if (setjmp(lab)==0) {