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