Setting std=c99 flag in GCC

后端 未结 2 739
孤城傲影
孤城傲影 2020-11-29 03:22

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

相关标签:
2条回答
  • 2020-11-29 03:40

    How about alias gcc99= gcc -std=c99?

    0 讨论(0)
  • 2020-11-29 03:47

    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.

    0 讨论(0)
提交回复
热议问题