Skip to contentSkip to conversation

error: attribute '__cold__': unknown attribute

DISCUSSION Dragoslav Zaric 1 participant 1 message Mar 28, 2009

lore
Share & tools
lore
#0 lore raw

When I compile latest kernel sources [2.6.29] I get on almost every line message :

error: attribute '__cold__': unknown attribute

I looked on the internet about __cold__ and I found this:

-----------------------------------------------------------------------------------------------------------------------
"gcc 4.3 supports a new __attribute__((__cold__)) to mark functions cold. Any path directly leading to a call of this function will be unlikely. And gcc will try to generate smaller code for the function itself.

Please use with care. The code generation advantage isn't large and in most cases it is not worth uglifying code with this.
"
-----------------------------------------------------------------------------------------------------------------------

Will see at home which version of gcc I have, maybe if I have less than gcc 4.3 and get gcc 4.3 it will be solved.

But anyway, what is "mark functions cold", what is this functionality ?

thanks,

Dragoslav Zaric,
[Professional programmer, M.Sc Astrophysics]