#What is -o2 in compiler flags?
17 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
Optimize Options (Using the GNU Compiler Collection (GCC))
in most cases you'll see the difference in binary size and speed (unnoticeable if there are small number of code that can be optimized).
-o2 sets the output file name to "2", -O2 sets the optimization level to 2
Would -o2 even work?
I would've thought it'd complain about an invalid option.
why would it not work?
Don't you need a space like this?
gcc main.c -o main
```instead of
gcc main.c -omain
Interesting
e.g. cut -d. -f1
i am interested in this optimization level. how many levels are there and how they differ. any link?
You can consult the documentation provided. The information you seek lie within
This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.