[英]Setting std=c99 flag in GCC
I was wondering if there were any files in which I could set the -std=c99
flag, so that I would not have to set it for every compilation.我想知道是否有任何文件可以设置
-std=c99
标志,这样我就不必为每个编译设置它。 I am using GCC 4.4 on Ubuntu.我在 Ubuntu 上使用 GCC 4.4。
Instead of calling /usr/bin/gcc
, use /usr/bin/c99
.而不是调用
/usr/bin/gcc
,使用/usr/bin/c99
。 This is the Single-Unix-approved way of invoking a C99 compiler.这是单一 Unix 认可的调用 C99 编译器的方式。 On an Ubuntu system, this points to a script which invokes
gcc
after having added the -std=c99
flag, which is precisely what you want.在 Ubuntu 系统上,这指向一个在添加
-std=c99
标志后调用gcc
的脚本,这正是您想要的。
alias gcc99= gcc -std=c99
怎么样?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.