about -00 option of gcc
Hello everyone,
What is the function of -00 option in gcc? I can not find related descriptions from gcc manual. thanks in advance, George |
Did you try the manpages?
Code:
man gcc The / key for searching is VERY common... it's used in less, vim, lynx, and many other command line tools. After performing at least one search, just typing / followed by enter finds the next occurence. Typing /-O0 and pressing enter and repeating the search as necessary would eventually lead you to the following: Code:
-O0 Do not optimize. This is the default. Quote:
|
He probably didn't find it because he was searching for -00, not -O0. understandable.
|
gcc -O0: disable optimizations
Hi -
The "-O0" turns optimizations OFF. You would do this if you want to make sure the code you're executing matches (as closely as possible) the code you actually wrote (without the compiler "second guessing" you). For this reason, compiling with "-g" (debug) usually implicitly sets "-O0" (so the code you're debugging matches the executable). And yes, "man" is definitely your friend! |
All times are GMT -5. The time now is 11:50 AM. |