在标头中包含cmath时编译C++文件



我最近从http://hpc.sourceforge.net/当我试图在头中包含cmath时,其他一切都很好,但它显示了以下错误:

/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/5.0.0/include-fixed/math.h:273:5: internal compiler error: Illegal instruction: 4
     return __inline_isfinitef(__x) && __builtin_fabsf(__x) >= __FLT_MIN__;
     ^
/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/5.0.0/include-fixed/math.h:273:5: internal compiler error: Abort trap: 6
g++: internal compiler error: Abort trap: 6 (program cc1plus)
Abort trap: 6

我正在使用OSXYosemite,在键入gcc-v时,它显示以下内容:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/5.0.0/lto-wrapper
Target: x86_64-apple-darwin13.4.0
Configured with: ../gcc-5-20140928/configure --enable-languages=c++,fortran
Thread model: posix
gcc version 5.0.0 20140928 (experimental) (GCC) 

提前感谢您抽出时间。

当为CPU编译GMP库时,可能会发生这种情况,该CPU提供运行时CPU上不可用的指令,请参阅GMP CPU标识

最新更新