Reputation: 2483
Is it possible to write C code so that when it is compiled with
gcc -o foo foo.c
it in fact compiles foo.c with -O2?
I am using gcc 4.4.6.
Upvotes: 2
Views: 134
Reputation: 6994
recent gcc knows a #pragma GCC optimize
pragma (http://gcc.gnu.org/onlinedocs/gcc/Function-Specific-Option-Pragmas.html)
Upvotes: 5