Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inlining warning

I am getting inlining warnings after compilation in 64 bit Linux machine. The compiler is :

gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1

The warnings are :

warning: inlining failed : call is unlikely and code size would grow
warning: called from here
warning: inlining failed: call is unlikely and code size would grow
warning: called from here
warning: inlining failed: call is unlikely and code size would grow
warning: called from here
warning: inlining failed: call is unlikely and code size would grow

I searched about it and compile it with -Winline option. but could not found the solution yet.I am looking for the way to get rid of it.How to get rid of it?

slightly edited on 9th May 2010

I have posted above problem that I was facing since long before. I am still looking for the solution for it. I tried with removing all the inline from the function. This lead to un-use of many functions defined in the code like:

warning: function  defined but not used

I think the removal of inline_ even reduced the performance(speed) of the code. Can anybody be please suggest some ideas for the above problem?

Is there any optimization method for it so that performance may not be reduced and this warning can also be removed.

like image 855
thetna Avatar asked May 20 '26 08:05

thetna


1 Answers

The compiler thinks that inlining those functions is a bad idea.

The inline keyword is just a suggestion, the compiler doesn't have to follow it. Presumably, the compiler is warning you that it decided to ignore the inline keyword.

like image 197
Turtle Avatar answered May 21 '26 21:05

Turtle