From 2147402a20f4bbef2962dafef8effa79bda09a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Tue, 6 Sep 2011 14:31:14 +0200 Subject: [PATCH] Const should be declared static Otherwise the C compiler complains about multiple definitions of the same symbol --- compiler/obc/c/c.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/obc/c/c.ml b/compiler/obc/c/c.ml index 0764e35..cc2dd04 100644 --- a/compiler/obc/c/c.ml +++ b/compiler/obc/c/c.ml @@ -294,7 +294,7 @@ let pp_cdecl fmt cdecl = match cdecl with fprintf fmt "@[%a %a(@[%a@]);@ @]@\n" pp_cty retty pp_string n pp_param_list args | Cdecl_constant (n, cty, ce) -> - fprintf fmt "@[const %a %a = %a;@ @]@\n" + fprintf fmt "@[static const %a %a = %a;@ @]@\n" pp_cty cty pp_string n pp_cconst_expr ce let pp_cdef fmt cdef = match cdef with