diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-02-08 15:54:10 +0100 |
---|---|---|
committer | Bernhard Schommer <bschommer@users.noreply.github.com> | 2017-02-17 14:09:56 +0100 |
commit | f066675dc9ead0ef88e27c139c046906f2fcdaeb (patch) | |
tree | caefc9ed60b4358ec2e78ec650cfee41ad14b05c | |
parent | 02ce352d5f402e43afde51337444b6cd13f06d7e (diff) | |
download | compcert-kvx-f066675dc9ead0ef88e27c139c046906f2fcdaeb.tar.gz compcert-kvx-f066675dc9ead0ef88e27c139c046906f2fcdaeb.zip |
Checks can be applied add several places.
There should not be a single check place, since for example
unknonw attributes should be check after elaboration and other
simplifications.
-rw-r--r-- | cparser/Checks.ml | 9 | ||||
-rw-r--r-- | cparser/Checks.mli | 2 | ||||
-rw-r--r-- | cparser/Parse.ml | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/cparser/Checks.ml b/cparser/Checks.ml index 434efea0..2e42cace 100644 --- a/cparser/Checks.ml +++ b/cparser/Checks.ml @@ -63,7 +63,7 @@ let rec unknown_attrs_stmt env s = | Sdecl d -> unknown_attrs_decl env s.sloc d let unknown_attrs_program p = - let rec transf_globdecls env = function + let rec unknown_attrs_globdecls env = function | [] -> () | g :: gl -> let env' = @@ -91,8 +91,5 @@ let unknown_attrs_program p = | Gpragma s -> env in - transf_globdecls env' gl - in transf_globdecls (Builtins.environment()) p - -let program p = - unknown_attrs_program p + unknown_attrs_globdecls env' gl + in unknown_attrs_globdecls (Builtins.environment()) p diff --git a/cparser/Checks.mli b/cparser/Checks.mli index 34185542..1566d6e4 100644 --- a/cparser/Checks.mli +++ b/cparser/Checks.mli @@ -13,4 +13,4 @@ (* *) (* *********************************************************************) -val program: C.program -> unit +val unknown_attrs_program: C.program -> unit diff --git a/cparser/Parse.ml b/cparser/Parse.ml index 0d3003aa..f7676083 100644 --- a/cparser/Parse.ml +++ b/cparser/Parse.ml @@ -25,7 +25,7 @@ let transform_program t p name = (run_pass Bitfields.program 'f' p)))) in let p2 = Rename.program p1 in - Checks.program p2; + Checks.unknown_attrs_program p2; p2 let parse_transformations s = |