public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90101c0
)
fixed behaviour on too long floating point constants
author
ceriel
<none@none>
Wed, 26 Jul 1989 11:16:59 +0000
(11:16 +0000)
committer
ceriel
<none@none>
Wed, 26 Jul 1989 11:16:59 +0000
(11:16 +0000)
lang/cem/cemcom/LLlex.c
patch
|
blob
|
history
lang/m2/comp/LLlex.c
patch
|
blob
|
history
diff --git
a/lang/cem/cemcom/LLlex.c
b/lang/cem/cemcom/LLlex.c
index
9a540f1
..
3ed953f
100644
(file)
--- a/
lang/cem/cemcom/LLlex.c
+++ b/
lang/cem/cemcom/LLlex.c
@@
-445,7
+445,7
@@
firstline:
buf[0] = '-'; /* good heavens... */
if (np == &buf[NUMSIZE+1]) {
lexerror("floating constant too long");
- ptok->tk_fval = Salloc("0.0",(unsigned) 5) + 1;
+ ptok->tk_fval = Salloc("
-
0.0",(unsigned) 5) + 1;
}
else
ptok->tk_fval = Salloc(buf,(unsigned) (np - buf)) + 1;
diff --git
a/lang/m2/comp/LLlex.c
b/lang/m2/comp/LLlex.c
index
3e0bd95
..
39b0790
100644
(file)
--- a/
lang/m2/comp/LLlex.c
+++ b/
lang/m2/comp/LLlex.c
@@
-582,7
+582,7
@@
lexwarning(W_ORDINARY, "overflow in constant");
PushBack();
if (np >= &buf[NUMSIZE]) {
- tk->TOK_REL = Salloc("
0.0", 5)
;
+ tk->TOK_REL = Salloc("
-0.0", 5)+1
;
lexerror("real constant too long");
}
else tk->TOK_REL = Salloc(buf, (unsigned) (np - buf)) + 1;