This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix C/C++ inlinability tests


On Tue, Sep 09, 2003 at 08:44:49PM +0200, Jan Hubicka wrote:
> 	* c-objc-common.c (c_cannot_inline_tree_fn): Warn
> 	on why function is not inlinable; do not check
> 	the body.
> 	(inline_forbidden_p): Move to...
> 	* tree-inline.c (inline_forbidden_p_1): Add warnings;
> 	deal with alloca, longjmp.
> 	(inline_forbidden_p): New static function.
> 	(find_alloca_call_1, find_alloca_call, find_builtin_longjmp_call_1,
> 	find_builtin_longjmp_call): Kill.

Generally ok.  Need to watch overlong lines, and spelling mistakes
(especially in error messages).

> ! 	  inline_forbidden_reason = "%Hfunction '%F' can never be inlined "
> ! 				    "because it use alloca (overwrite using "
> ! 				    "always_inline attribute)";

"use" -> "uses", "overwrite" -> "override", add "the" or "an".

> ! 				    " because it use setjmp";
> ! 				      " because it use variable argument lists";

use
> ! 				    "because it contains nested function";

add "a".

Really, this should only be true of nested functions that reference 
variables in the parent.  If no such reference exists, the child can
be trivially unnested.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]