I run on Ubuntu 10.10.
man g++ talks about -O1, -O2, -O3 optimization options
I noticed that -O5 works also, as well as -O1000…
I used “g++ -v -O5 toto.cpp”, but it is not clear to me what’s the difference. What does -O5 do actually ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
-O5currently does the same as-O3, as does-O1000. Optimization level 3 is currently the max, but the-Oflag accepts a higher level anyway for forward compatibility. Proof: