gcc 提供一種「定義函數屬性(attribute)」的語法,__attribute__ 用來讓我們定義函數的行為,以便告訴 gcc 在編譯時期對此函數做一些特殊的處理或檢查動作。
"__attribute__" 寫在函數宣告之前或之後都可以(左括號前或右括號後),並接著使用一對「雙括號」來註明此函數的屬性。語法:
__attribute__((keywords)) functon_name(...);
星期二, 1月 29, 2008
__attribute__ 用法
張貼者:
小明王
於
4:50 下午
標籤:
技術
相關文章:
- sed(string editor) - 2008-01-30
- __attribute__ 用法 - 續 - 2008-01-30
- Linux TimeZone - 2009-06-10
- Fon改 DD-WRT - 2009-01-04
- PS Eye on PC - 2008-12-17
訂閱:
張貼留言 (Atom)
0 意見:
張貼留言