aboutsummaryrefslogtreecommitdiff
path: root/gcc/real.c
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-08-24 20:04:10 +0000
committerGreg McGary <gkm@gcc.gnu.org>2000-08-24 20:04:10 +0000
commit87ae0c74eb1e515d6d7c97892fdcaf11db61dea4 (patch)
tree5c8fd698f16c17800afb5191249554caaaadbba9 /gcc/real.c
parent15bcd79ab011e643d53b751c5705e33fd1440ece (diff)
downloadgcc-87ae0c74eb1e515d6d7c97892fdcaf11db61dea4.zip
gcc-87ae0c74eb1e515d6d7c97892fdcaf11db61dea4.tar.gz
gcc-87ae0c74eb1e515d6d7c97892fdcaf11db61dea4.tar.bz2
cppfiles.c (actual_directory): Don't write beyond `dir' when it contains "".
* cppfiles.c (actual_directory): Don't write beyond `dir' when it contains "". * real.c (asctoeg): Stay within bounds of etens[][]. From-SVN: r35944
Diffstat (limited to 'gcc/real.c')
-rw-r--r--gcc/real.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/real.c b/gcc/real.c
index eb8736c..6c09f75 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -5132,9 +5132,9 @@ asctoeg (ss, y, oprec)
{
unsigned EMUSHORT yy[NI], xt[NI], tt[NI];
int esign, decflg, sgnflg, nexp, exp, prec, lost;
- int k, trail, c, rndsav;
+ int i, k, trail, c, rndsav;
EMULONG lexp;
- unsigned EMUSHORT nsign, *p;
+ unsigned EMUSHORT nsign;
char *sp, *s, *lstr;
int base = 10;
@@ -5418,14 +5418,14 @@ read_expnt:
nexp -= 4096;
}
}
- p = &etens[NTEN][0];
emov (eone, xt);
exp = 1;
+ i = NTEN;
do
{
if (exp & nexp)
- emul (p, xt, xt);
- p -= NE;
+ emul (etens[i], xt, xt);
+ i--;
exp = exp + exp;
}
while (exp <= MAXP);