When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.
-O2 to the linker? 18%? I just tried that and the filesize is still the same.-Wl,-O2Am I missing something?
-Os optimizes sizeand it doesn't need to be passed directly to the linker.
-O levelIf level is a numeric values greater than zero ld optimizes the output. This might take significantly longer and thereforeprobably should only be enabled for the final binary.
man gcc says:-O1 Optimize.-O2 Optimize even more...performs nearly all supported optimizations that do not involve a space-speed tradeoff.-O3 Optimize yet more.-O0 Do not optimize. This is the default.-Os Optimize for size. -Os enables all -O2 optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size.
If someone tried any of the ones MSVC 2005 fails, I would want to slap them for making me go :? as I tried to read their code.
Quote from: 280Z28 on January 22, 2006, 04:28:07 pmIf someone tried any of the ones MSVC 2005 fails, I would want to slap them for making me go :? as I tried to read their code.Which one for example?Michael
int main(int argc, char *argv[]){ int i = compl((2 bitor 4) xor 4) bitand 3; bool b = not ((true or false) and true); b and_eq true; b or_eq false; b xor_eq true; b not_eq not b; return 0;}
Codeint main(int argc, char *argv[]){ int i = compl((2 bitor 4) xor 4) bitand 3; bool b = not ((true or false) and true); b and_eq true; b or_eq false; b xor_eq true; b not_eq not b; return 0;}
Yes, I have to admit it has made me confusing too . Anyway, I like C++, because it can always surprise me with something I did not even know possible and therefore stimulate my desire to continue studying and using it.Anyway, e.g., compl is an alternative to the ~ operator. The others are explained here.Michael
No, no. compl is a way to get coworkers to :x and then kill you. :lol: