非機密扱い | ![]() | ARM DUI0472LJ | ||
| ||||
ホーム > コンパイラ固有の機能 > __attribute__((weak)) 変数属性 |
weak 変数を宣言できます。この宣言は、__weak
と似た方法で作用します。
extern int Variable_Attributes_weak_1 __attribute__((weak));
__weak int Variable_Attributes_weak_compare;
extern
修飾子を指定する必要があります。非 GNU モードでは、変数が extern
でない場合、コンパイラはその変数を他の非 weak 変数と同じように扱います。