diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2018-07-08 18:03:44 +0200 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2018-07-08 18:06:06 +0200 |
commit | 2a6876b762f21e624a9138927dff5baf29086397 (patch) | |
tree | 38d826f165d5996ba5d2ac5ba291610d96823ba3 | |
parent | 39ba36bfa1ee2aa951dbad9f518bde81e45f3e9d (diff) |
Get rid of horrendous hack limiting the size of parsed integers
-rw-r--r-- | parsing/g_prim.mlg | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/parsing/g_prim.mlg b/parsing/g_prim.mlg index 774db97f2..dfb788907 100644 --- a/parsing/g_prim.mlg +++ b/parsing/g_prim.mlg @@ -24,13 +24,9 @@ let local_make_qualid loc l id = make_qualid ~loc (DirPath.make l) id let my_int_of_string loc s = try - let n = int_of_string s in - (* To avoid Array.make errors (that e.g. Undo uses), we set a *) - (* more restricted limit than int_of_string does *) - if n > 1024 * 2048 then raise Exit; - n - with Failure _ | Exit -> - CErrors.user_err ~loc (Pp.str "Cannot support a so large number.") + int_of_string s + with Failure _ -> + CErrors.user_err ~loc (Pp.str "This number is too large.") } |