0
我正在使用-O2標誌編譯我的程序,我發現忽略了某個變量的屬性。爲什麼會這樣,我該如何強制它接受這個屬性?gcc:警告:忽略'used'屬性
extern const int my_var __attribute__((used)); // but my_var is not actually
// used in this file, but I'd
// like it to be included in
// the symbol table
warning: 'used' attribute ignored