Re: warning: inlining failed

From: Jacques A. Vidrine <nectar_at_FreeBSD.org>
Date: Fri, 18 Jul 2003 14:40:29 -0500
On Fri, Jul 18, 2003 at 12:18:14PM -0700, Nate Lawson wrote:
> Warner mentioned this was due to the gcc import.  Nearly every part of the
> kernel that uses newbus or buf.h prints out lots of warnings.  Can someone
> see about fixing this, whether it's by fixing our headers or build flags
> or gcc itself?  I've already wasted a few reboot cycles because valid
> warnings were lost in the crowd.
> 
> cc -O -pipe -mcpu=pentiumpro  -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 -DKLD_MODULE -nostdinc -I-   -I. -I_at_ -I_at_/dev -I_at_/../include -I/usr/include -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 -c
> /home/src/sys/modules/ext2fs/../../gnu/ext2fs/ext2_vfsops.c
> /home/src/sys/gnu/ext2fs/ext2_vfsops.c: In function `compute_sb_data':
> _at_/sys/buf.h:281: warning: inlining failed in call to `BUF_LOCK'
> /home/src/sys/gnu/ext2fs/ext2_vfsops.c:496: warning: called from here
> /home/src/sys/gnu/ext2fs/ext2_vfsops.c: In function `ext2_unmount':
> _at_/sys/buf.h:281: warning: inlining failed in call to `BUF_LOCK'
> /home/src/sys/gnu/ext2fs/ext2_vfsops.c:774: warning: called from here
> _at_/sys/buf.h:281: warning: inlining failed in call to `BUF_LOCK'
> /home/src/sys/gnu/ext2fs/ext2_vfsops.c:780: warning: called from here
> _at_/sys/buf.h:281: warning: inlining failed in call to `BUF_LOCK'
> /home/src/sys/gnu/ext2fs/ext2_vfsops.c:784: warning: called from here

Does `-finline-limit=1200' (or bigger) help?

I think GCC 3.3 added a warning for when inline functions generated `a
lot' of instructions.  In such a case, the function is not inlined.  I
believe this also happened with GCC 3.2, but it just didn't normally
tell you about it.

Cheers,
-- 
Jacques Vidrine   . NTT/Verio SME      . FreeBSD UNIX       . Heimdal
nectar_at_celabo.org . jvidrine_at_verio.net . nectar_at_freebsd.org . nectar_at_kth.se
Received on Fri Jul 18 2003 - 10:40:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:15 UTC