This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix C/C++ inlinability tests
- From: Richard Henderson <rth at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 9 Sep 2003 13:29:41 -0700
- Subject: Re: Fix C/C++ inlinability tests
- References: <20030909184449.GH24264@kam.mff.cuni.cz>
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~