aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Gross2019-01-31 14:08:30 -0500
committerJason Gross2019-01-31 14:08:30 -0500
commit34f8872ba83aa5e91d73a80034b4c58db25dbbf7 (patch)
treecb190ca5e48963e6a6b8731e6b7bd8538c76c28b
parentf6f9cf742ee5894be65d6e2de527e3ab5a643491 (diff)
Fix off-by-one error in nat syntax warnings
Fixes #9453
-rw-r--r--test-suite/bugs/closed/bug_9453.v7
-rw-r--r--theories/Init/Prelude.v2
2 files changed, 8 insertions, 1 deletions
diff --git a/test-suite/bugs/closed/bug_9453.v b/test-suite/bugs/closed/bug_9453.v
new file mode 100644
index 0000000000..18745533b2
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9453.v
@@ -0,0 +1,7 @@
+(* check compatibility with 8.8 and earlier for lack of warnings on the nat 5000 *)
+Set Warnings Append "+large-nat,+abstract-large-number".
+Fail Check 5001.
+Check 5000.
+(* Error:
+To avoid stack overflow, large numbers in nat are interpreted as applications of
+Nat.of_uint. *)
diff --git a/theories/Init/Prelude.v b/theories/Init/Prelude.v
index 5e29f854e8..81268a87ad 100644
--- a/theories/Init/Prelude.v
+++ b/theories/Init/Prelude.v
@@ -38,7 +38,7 @@ Numeral Notation Decimal.int Decimal.int_of_int Decimal.int_of_int
: dec_int_scope.
(* Parsing / printing of [nat] numbers *)
-Numeral Notation nat Nat.of_uint Nat.to_uint : nat_scope (abstract after 5000).
+Numeral Notation nat Nat.of_uint Nat.to_uint : nat_scope (abstract after 5001).
(* Printing/Parsing of bytes *)
Export Byte.ByteSyntaxNotations.