LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 05-17-2005, 03:30 PM   #1
extremeware
LQ Newbie
 
Registered: Feb 2005
Location: Beijing
Posts: 9

Rep: Reputation: 0
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
 
Old 05-17-2005, 03:52 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
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.
 
Old 05-17-2005, 04:06 PM   #3
avarus
Member
 
Registered: Apr 2004
Location: Oxford, UK
Distribution: Ubuntu, Debian, various
Posts: 230
Blog Entries: 5

Rep: Reputation: 32
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
 
Old 05-17-2005, 04:09 PM   #4
extremeware
LQ Newbie
 
Registered: Feb 2005
Location: Beijing
Posts: 9

Original Poster
Rep: Reputation: 0
weak is an __attribute__ of functions. i found it in manual.
what I did not found find is combination with

bitwise, safe and force.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What's this: __attribute__((packed)) frankli Programming 19 09-14-2012 12:08 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration