From 6cfc4dac7a8962bc49b88c9cb75156c7b6abd5c1 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 7 Apr 2017 14:02:15 +0200 Subject: Do not generate code for "inline definitions" ISO C99 states that "inline defintions", functions with inline specifier that are not extern, does not provide an external definition and another compilation unit can contain an external definition. Thus in the case of non-static inline functions no code should be generated. Bug 21343 --- backend/PrintAsm.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backend/PrintAsm.ml') diff --git a/backend/PrintAsm.ml b/backend/PrintAsm.ml index 1f100b7e..0e9eadcb 100644 --- a/backend/PrintAsm.ml +++ b/backend/PrintAsm.ml @@ -102,7 +102,9 @@ module Printer(Target:TARGET) = let print_globdef oc (name,gdef) = match gdef with - | Gfun (Internal code) -> print_function oc name code + | Gfun (Internal code) -> + if not (C2C.atom_is_iso_inline_definition name) then + print_function oc name code | Gfun (External ef) -> () | Gvar v -> print_var oc name v -- cgit