LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   what do all those __attribute__(()) mean? (http://www.linuxquestions.org/questions/programming-9/what-do-all-those-__attribute__-mean-324458/)

extremeware 05-17-2005 02:30 PM

what do all those __attribute__(()) mean?
 
I have been looking into the document of gcc, and did not find any thing of using __attribute__ as follows

__attribute__((safe))
__attribute__((bitwise))
__attribute__((force))

i actually find those above when i read kernel source code. And i just can not figure them out with gcc manual.

what are the meanings ?

or it is kind of usage of __attribute__ with any word that just to keep a note or what?

thank you first

rjlee 05-17-2005 02:52 PM

I found this on Google: http://kolpackov.net/pipermail/notes...ch/000006.html

This looks like it's for defining weakly-defined symbols, where an unresolved symbol gets set to NULL rather than causing the program to abort with an error.

avarus 05-17-2005 03:06 PM

As you say - those particular attributes don't show up in the GCC docs nor in any obvious Google search.

If I were you I would mail the listed maintainer of the kernel code you are looking at directly and see if they can shed some light.

TIM

extremeware 05-17-2005 03:09 PM

weak is an __attribute__ of functions. i found it in manual.
what I did not found find is combination with

bitwise, safe and force.


All times are GMT -5. The time now is 01:09 PM.