2009-03-28 08:26:16

by Dragoslav Zaric

[permalink] [raw]
Subject: error: attribute '__cold__': unknown attribute

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]