From 2c46ae4bd8f9f49554daa31988fd98793cc5601e Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Sun, 26 Sep 2021 17:37:52 +0200 Subject: Qualify `Instance` and `Program Instance` as `Global` This avoids a new warning of Coq 8.14. --- cfrontend/Cshmgenproof.v | 2 +- cfrontend/Ctypes.v | 8 ++++---- cfrontend/SimplExprproof.v | 2 +- cfrontend/SimplLocalsproof.v | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'cfrontend') diff --git a/cfrontend/Cshmgenproof.v b/cfrontend/Cshmgenproof.v index 8e396e2a..98293888 100644 --- a/cfrontend/Cshmgenproof.v +++ b/cfrontend/Cshmgenproof.v @@ -1968,7 +1968,7 @@ End CORRECTNESS. (** ** Commutation with linking *) -Instance TransfCshmgenLink : TransfLink match_prog. +Global Instance TransfCshmgenLink : TransfLink match_prog. Proof. red; intros. destruct (link_linkorder _ _ _ H) as (LO1 & LO2). generalize H. diff --git a/cfrontend/Ctypes.v b/cfrontend/Ctypes.v index e3356510..504e8be1 100644 --- a/cfrontend/Ctypes.v +++ b/cfrontend/Ctypes.v @@ -1530,7 +1530,7 @@ Unset Implicit Arguments. (** ** Linking types *) -Program Instance Linker_types : Linker type := { +Global Program Instance Linker_types : Linker type := { link := fun t1 t2 => if type_eq t1 t2 then Some t1 else None; linkorder := fun t1 t2 => t1 = t2 }. @@ -1579,7 +1579,7 @@ Proof. assert (x = y) by eauto. subst y. auto. Qed. -Program Instance Linker_composite_defs : Linker (list composite_definition) := { +Global Program Instance Linker_composite_defs : Linker (list composite_definition) := { link := link_composite_defs; linkorder := @List.incl composite_definition }. @@ -1765,7 +1765,7 @@ Inductive linkorder_fundef {F: Type}: fundef F -> fundef F -> Prop := | linkorder_fundef_ext_int: forall f id sg targs tres cc, linkorder_fundef (External (EF_external id sg) targs tres cc) (Internal f). -Program Instance Linker_fundef (F: Type): Linker (fundef F) := { +Global Program Instance Linker_fundef (F: Type): Linker (fundef F) := { link := link_fundef; linkorder := linkorder_fundef }. @@ -1828,7 +1828,7 @@ Definition linkorder_program {F: Type} (p1 p2: program F) : Prop := linkorder (program_of_program p1) (program_of_program p2) /\ (forall id co, p1.(prog_comp_env)!id = Some co -> p2.(prog_comp_env)!id = Some co). -Program Instance Linker_program (F: Type): Linker (program F) := { +Global Program Instance Linker_program (F: Type): Linker (program F) := { link := link_program; linkorder := linkorder_program }. diff --git a/cfrontend/SimplExprproof.v b/cfrontend/SimplExprproof.v index 67bf0e51..507e2128 100644 --- a/cfrontend/SimplExprproof.v +++ b/cfrontend/SimplExprproof.v @@ -2444,7 +2444,7 @@ End PRESERVATION. (** ** Commutation with linking *) -Instance TransfSimplExprLink : TransfLink match_prog. +Global Instance TransfSimplExprLink : TransfLink match_prog. Proof. red; intros. eapply Ctypes.link_match_program_gen; eauto. - intros. diff --git a/cfrontend/SimplLocalsproof.v b/cfrontend/SimplLocalsproof.v index e4b759c4..c133d8ea 100644 --- a/cfrontend/SimplLocalsproof.v +++ b/cfrontend/SimplLocalsproof.v @@ -2320,7 +2320,7 @@ End PRESERVATION. (** ** Commutation with linking *) -Instance TransfSimplLocalsLink : TransfLink match_prog. +Global Instance TransfSimplLocalsLink : TransfLink match_prog. Proof. red; intros. eapply Ctypes.link_match_program; eauto. - intros. -- cgit