Setting std=c99 flag in GCC

2019-01-06 14:34发布

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. I am using GCC 4.4 on Ubuntu.

2条回答
冷血范
2楼-- · 2019-01-06 14:48

How about alias gcc99= gcc -std=c99?

查看更多
淡お忘
3楼-- · 2019-01-06 15:03

Instead of calling /usr/bin/gcc, use /usr/bin/c99. This is the Single-Unix-approved way of invoking a C99 compiler. 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.

查看更多
登录 后发表回答