views:

197

answers:

1
+1  Q: 

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 in call to ‘list_Cons’: call is unlikely and code size would grow
warning: called from here
warning: inlining failed in call to ‘list_List’: call is unlikely and code size would grow
warning: called from here
warning: inlining failed in call to ‘list_Cons’: call is unlikely and code size would grow
warning: called from here
warning: inlining failed in call to ‘misc_Error’: 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: ‘clause_IsGround’ defined but not used
warning: ‘clause_IsEmptyClause’ defined but not used
warning: ‘clause_LiteralIsFromConstraint’ defined but not used
warning: ‘clause_LiteralIsFromAntecedent’ defined but not used
warning: ‘clause_LiteralIsFromSuccedent’ defined but not used
warning: ‘clause_IsSubsortClause’ 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?

A: 

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.

Turtle
Is there any way to get rid of it ? Or simply we have to ignore it or are there any ways to supress those warnings? I am not sure how wise is it to supress the warnings.
thetna