diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/integrate.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83ddf36..99368f2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-03-26 Mark Mitchell <mark@codesourcery.com> + + * integrate.c (function_cannot_inline_p): Do inline functions that + return `void'. + Sun Mar 26 11:37:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * stor-layout.c (layout_type, set_sizetype): early_type_list is diff --git a/gcc/integrate.c b/gcc/integrate.c index 5b8c8dc..163f59b 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 |