From 5f61d89783b4b3a85203025853c7f558a4aee7a7 Mon Sep 17 00:00:00 2001 From: xleroy Date: Sat, 28 Jul 2012 01:19:20 +0000 Subject: Forgot to collect types of expressions git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1984 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/PrintClight.ml | 4 +++- cfrontend/PrintCsyntax.ml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'cfrontend') diff --git a/cfrontend/PrintClight.ml b/cfrontend/PrintClight.ml index feb07fa..ced5717 100644 --- a/cfrontend/PrintClight.ml +++ b/cfrontend/PrintClight.ml @@ -252,7 +252,9 @@ let print_fundef p (id, fd) = (* Collect struct and union types *) -let rec collect_expr = function +let rec collect_expr e = + collect_type (typeof e); + match e with | Econst_int _ -> () | Econst_float _ -> () | Evar _ -> () diff --git a/cfrontend/PrintCsyntax.ml b/cfrontend/PrintCsyntax.ml index ae25e17..f63c150 100644 --- a/cfrontend/PrintCsyntax.ml +++ b/cfrontend/PrintCsyntax.ml @@ -440,7 +440,9 @@ and collect_fields = function | Fnil -> () | Fcons(id, hd, tl) -> collect_type hd; collect_fields tl -let rec collect_expr = function +let rec collect_expr e = + collect_type (typeof e); + match e with | Eloc _ -> assert false | Evar _ -> () | Ederef(r, _) -> collect_expr r -- cgit v1.2.3