Add -Winline
PATCH 1/1 Add -Winline
Add -Winline by default. This makes the compiler warn when something marked inline is not getting inlined. This is often because the
It should only make a difference with gcc 3.4, because in earlier compilers we use always_inline and not inlining with always_inline is an error already.
Makefile renamed from Makefile-o +3 -0
@@ -448,6 +449,9 @@ # warn about C99 declaration after statement CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,) +# warn about impossible inlines +CFLAGS += $(call check_gcc,-Winline,) + # # INSTALL_PATH specifies where to place the updated kernel and system map # images. Uncomment if you want to place them anywhere other than root.
Quoted 8 lines · Andi Kleen
Add -Winline by default. This makes the compiler warn when something marked inline is not getting inlined. This is often because the
It should only make a difference with gcc 3.4, because in earlier compilers we use
always_inlineand not inlining withalways_inlineis an error already.
...
Attached are all inlining warnings I get with this patch applied in 2.6.1-mm3 using gcc 3.3.3 20040110 (prerelease) (Debian).
I've gzip'ed it since it was > 100 kB.
A few warnings might be missing since I used a .config with CONFIG_SMP=y.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 10 lines · Andi Kleen
Quoted 8 lines
Add -Winline by default. This makes the compiler warn when something marked inline is not getting inlined. This is often because the
It should only make a difference with gcc 3.4, because in earlier compilers we use
always_inlineand not inlining withalways_inlineis an error already.
...
Quoted 7 lines
Attached are all inlining warnings I get with this patch applied in 2.6.1-mm3 using gcc 3.3.3 20040110 (prerelease) (Debian).
I've gzip'ed it since it was > 100 kB.
A few warnings might be missing since I used a .config with
CONFIG_SMP=y.
Are you sure that you do use always_inline? (ie can you look into one of preprocessed file for declaration of some of failed functions?)
Honza
Quoted 11 lines
cu
AdrianSignature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed
Quoted 13 lines · Jan Hubicka
Quoted 13 lines · Andi Kleen
Quoted 8 lines
Add -Winline by default. This makes the compiler warn when something marked inline is not getting inlined. This is often because the
It should only make a difference with gcc 3.4, because in earlier compilers we use
always_inlineand not inlining withalways_inlineis an error already.
...Attached are all inlining warnings I get with this patch applied in 2.6.1-mm3 using gcc 3.3.3 20040110 (prerelease) (Debian).
Quoted 7 lines
Quoted 4 lines
I've gzip'ed it since it was > 100 kB.
A few warnings might be missing since I used a .config with
CONFIG_SMP=y.Are you sure that you do use
always_inline? (ie can you look into one of preprocessed file for declaration of some of failed functions?)
Yes, e.g. in drivers/ieee1394/eth1394.c:
<-- snip -->
...
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void purge_partial_datagram(struct list_head *old)
{
...
<-- snip -->
Quoted 1 line
Honza
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed