#What is -o2 in compiler flags?

17 messages · Page 1 of 1 (latest)

edgy shadow
#

.

wooden socketBOT
#

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.

tough marsh
#

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).

tribal bay
#

-o2 sets the output file name to "2", -O2 sets the optimization level to 2

sharp thicket
tribal bay
#

why would it not work?

sharp thicket
#

Don't you need a space like this?

gcc main.c -o main
```instead of 

gcc main.c -omain

tribal bay
#

no

#

that applies to most single letter option in most programs

sharp thicket
#

Interesting

tribal bay
#

e.g. cut -d. -f1

edgy shadow
tribal bay
magic crag
wooden socketBOT
#

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.