获取错误“无法识别的选项-Xa”在gcc版本4.1.2中 [英] Getting Error "unrecognized option -Xa " in gcc version 4.1.2

查看:258
本文介绍了获取错误“无法识别的选项-Xa”在gcc版本4.1.2中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Linux gcc版本4.1.2中,我收到错误cc:无法识别的选项'-Xa'。关于这个编译器选项的任何想法' - Xa'。然而它被编译成solaris gcc 3.4.3版本。

解决方案> -Xa 是Sun C编译器选项。
手册页cc.1

 
-X [c | a | t | s ]
指定ISO ISO stan-
dard [...]

a的一致性程度这是默认的编译器模式。 ISO C加上K&R
C兼容性扩展,其语义变化为ISO C所要求的
。其中,K&R C和ISO C为同一构造指定
不同的语义,
编译器使用ISO C解释。如果将-Xa
选项与-xtransi-
tion选项一起使用,则编译器将发出有关
不同语义的警告。预定义宏
__STDC__的值为0并带有-Xa选项。


In Linux gcc version 4.1.2 I am getting error "cc: unrecognized option '-Xa'". Any idea about this compiler option '-Xa' . However it gets compiled in solaris gcc 3.4.3 version.

解决方案

-Xa is a Sun C compiler option. From Man Page cc.1:

     -X[c|a|t|s]
          Specifies the degree of conformance to the ISO C stan-
          dard[...]

          a    This is the default compiler mode. ISO C plus K&R
               C compatibility extensions, with semantic changes
               required by ISO C. Where K&R C and ISO C specify
               different semantics for the same construct, the
               compiler uses the ISO C interpretation. If the -Xa
               option is used in conjunction with the -xtransi-
               tion option, the compiler issues warnings about
               the different semantics. The predefined macro
               __STDC__ has a value of 0 with the -Xa option.

这篇关于获取错误“无法识别的选项-Xa”在gcc版本4.1.2中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆