aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/expr.c b/expr.c
index 92cd4d9..9e92fd3 100644
--- a/expr.c
+++ b/expr.c
@@ -208,7 +208,7 @@ primaryexpr(struct scope *s)
/* floating constant */
errno = 0;
e->constant.f = strtod(tok.lit, &end);
- if (errno)
+ if (errno && errno != ERANGE)
error(&tok.loc, "invalid floating constant '%s': %s", tok.lit, strerror(errno));
if (!end[0])
e->type = &typedouble;