From f801334326ee7c35c47c47dc3742a3fb4dde1689 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Sun, 26 Mar 2000 19:09:36 +0000 Subject: [PATCH] integrate.c (function_cannot_inline_p): Do inline functions that return `void'. * integrate.c (function_cannot_inline_p): Do inline functions that return `void'. From-SVN: r32752 --- gcc/ChangeLog | 5 +++++ gcc/integrate.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83ddf360c1f..99368f25c61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-03-26 Mark Mitchell + + * integrate.c (function_cannot_inline_p): Do inline functions that + return `void'. + Sun Mar 26 11:37:55 2000 Richard Kenner * stor-layout.c (layout_type, set_sizetype): early_type_list is diff --git a/gcc/integrate.c b/gcc/integrate.c index 5b8c8dc7b25..163f59bd473 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -186,7 +186,8 @@ function_cannot_inline_p (fndecl) return N_("inline functions not supported for this return value type"); /* We can't inline functions that return structures of varying size. */ - if (int_size_in_bytes (TREE_TYPE (TREE_TYPE (fndecl))) < 0) + if (TREE_CODE (TREE_TYPE (TREE_TYPE (fndecl))) != VOID_TYPE + && int_size_in_bytes (TREE_TYPE (TREE_TYPE (fndecl))) < 0) return N_("function with varying-size return value cannot be inline"); /* Cannot inline a function with a varying size argument or one that -- 2.30.2