aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-03-15 21:30:33 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2023-03-15 21:30:33 +0000
commit8f1711ef3486b0727ccf6b5aabddda5c7d986457 (patch)
treed7b8a96fc8e4388526d6b305c82dcf3088e1da50 /gcc
parent57052c6ed59c1a2ee4a67982f960e08593956955 (diff)
downloadgcc-8f1711ef3486b0727ccf6b5aabddda5c7d986457.zip
gcc-8f1711ef3486b0727ccf6b5aabddda5c7d986457.tar.gz
gcc-8f1711ef3486b0727ccf6b5aabddda5c7d986457.tar.bz2
PR 109125 13 regression SIGBUS in m2pim_ldtoa_ldtoa
This patch fixes more bool int parameter mismatches found in dtoa and ldtoa. gcc/m2/ChangeLog: PR modula2/109125 * gm2-libs-ch/dtoa.cc (dtoa_strtod): Replace int with bool. * gm2-libs-ch/ldtoa.cc (ldtoa_strtold): Replace int with bool. libgm2/ChangeLog: PR modula2/109125 * libm2pim/dtoa.cc (TRUE): Remove. (FALSE): Remove. Replace int with bool. * libm2pim/ldtoa.cc (TRUE): Remove. (FALSE): Remove. Replace int with bool. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/m2/gm2-libs-ch/dtoa.cc4
-rw-r--r--gcc/m2/gm2-libs-ch/ldtoa.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/gcc/m2/gm2-libs-ch/dtoa.cc b/gcc/m2/gm2-libs-ch/dtoa.cc
index 2aa774d..1966323 100644
--- a/gcc/m2/gm2-libs-ch/dtoa.cc
+++ b/gcc/m2/gm2-libs-ch/dtoa.cc
@@ -48,7 +48,7 @@ typedef enum Mode { maxsignicant, decimaldigits } Mode;
(ndigits may be negative). */
double
-dtoa_strtod (const char *s, int *error)
+dtoa_strtod (const char *s, bool *error)
{
char *endp;
double d;
@@ -58,7 +58,7 @@ dtoa_strtod (const char *s, int *error)
if (endp != NULL && (*endp == '\0'))
*error = (errno != 0);
else
- *error = TRUE;
+ *error = true;
return d;
}
diff --git a/gcc/m2/gm2-libs-ch/ldtoa.cc b/gcc/m2/gm2-libs-ch/ldtoa.cc
index b1df51b..9d01fa1 100644
--- a/gcc/m2/gm2-libs-ch/ldtoa.cc
+++ b/gcc/m2/gm2-libs-ch/ldtoa.cc
@@ -52,7 +52,7 @@ extern int dtoa_calcsign (char *p, int str_size);
(ndigits may be negative). */
long double
-ldtoa_strtold (const char *s, int *error)
+ldtoa_strtold (const char *s, bool *error)
{
char *endp;
long double d;
@@ -67,7 +67,7 @@ ldtoa_strtold (const char *s, int *error)
if (endp != NULL && (*endp == '\0'))
*error = (errno != 0);
else
- *error = TRUE;
+ *error = true;
return d;
}