我在64位RedhatEnterprise3计算机上编译了GCC4.5.2(2.4.21-20.ELsmp,glibc 2.3.2)。它可以编译,但是有很多警告信息,比如

/tmp/ccbGRF5F.s: Assembler messages:
/tmp/ccbGRF5F.s:29: Warning: rest of line ignored; first ignored character is `d'
/tmp/ccbGRF5F.s:33: Warning: rest of line ignored; first ignored character is `d'
/tmp/ccbGRF5F.s:169: Warning: rest of line ignored; first ignored character is `i'

然后我尝试用编译器编译代码,但它仍然会发出这些asm警告,而且我的C代码中没有使用任何asm。我怎样才能摆脱它呢?修复或取消警告都可以。

最佳答案

似乎您的binutils太老了,无法处理gcc-4.5的输出,而在另一个项目中,它可能会直接以编译失败告终。考虑到RHEL3,我一点也不惊讶。

10-05 18:19