From 70609c932e066ffab0d2e3a2a38d66e834399532 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Sun, 21 Jun 2020 19:14:32 +0200 Subject: Transform non-recursive Fixpoint into Definition As detected by the new warning in Coq 8.12. The use of Fixpoint here is not warranted and either an oversight or a leftover from an earlier version. --- backend/Debugvar.v | 2 +- backend/NeedDomain.v | 2 +- common/AST.v | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/Debugvar.v b/backend/Debugvar.v index 1f361030..3204dae5 100644 --- a/backend/Debugvar.v +++ b/backend/Debugvar.v @@ -92,7 +92,7 @@ Fixpoint remove_state (v: ident) (s: avail) : avail := end end. -Fixpoint set_debug_info (v: ident) (info: list (builtin_arg loc)) (s: avail) := +Definition set_debug_info (v: ident) (info: list (builtin_arg loc)) (s: avail) := match normalize_debug info with | Some a => set_state v a s | None => remove_state v s diff --git a/backend/NeedDomain.v b/backend/NeedDomain.v index 3c2d8e20..d9e9e025 100644 --- a/backend/NeedDomain.v +++ b/backend/NeedDomain.v @@ -47,7 +47,7 @@ Definition iagree (p q mask: int) : Prop := forall i, 0 <= i < Int.zwordsize -> Int.testbit mask i = true -> Int.testbit p i = Int.testbit q i. -Fixpoint vagree (v w: val) (x: nval) {struct x}: Prop := +Definition vagree (v w: val) (x: nval) : Prop := match x with | Nothing => True | I m => diff --git a/common/AST.v b/common/AST.v index fcbf0b34..ddd10ede 100644 --- a/common/AST.v +++ b/common/AST.v @@ -105,7 +105,7 @@ Lemma rettype_eq: forall (t1 t2: rettype), {t1=t2} + {t1<>t2}. Proof. generalize typ_eq; decide equality. Defined. Global Opaque rettype_eq. -Fixpoint proj_rettype (r: rettype) : typ := +Definition proj_rettype (r: rettype) : typ := match r with | Tret t => t | Tint8signed | Tint8unsigned | Tint16signed | Tint16unsigned => Tint -- cgit