Setting std=c99 flag in GCC
Solution 1:
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.
Solution 2:
How about alias gcc99= gcc -std=c99
?