☆ Yσɠƚԋσʂ ☆ to Programmer Humor • 1 year agoOptimized Codeimagemessage-square8arrow-up127arrow-down14
minus-square@dragnucslink2•1 year agoTried it on https://www.onlinegdb.com/online_c++_compiler Could not reproduce.
minus-square@Prologue7642@lemmygrad.mllinkfedilink4•1 year agoYou need to use exactly the same command: clang++ loop.cpp -O1 -Wall -o loop this page likely doesn’t use clang but GCC, so it won’t work.
minus-square☆ Yσɠƚԋσʂ ☆OPlink1•1 year agook yeah didn’t work on my machine either edit: interestingly enough seems to work on some architectures and not others, a friend of mine tried it and it worked for him. I guess that’s why it’s an undefined behvaior. :)
Tried it on https://www.onlinegdb.com/online_c++_compiler Could not reproduce.
You need to use exactly the same command:
clang++ loop.cpp -O1 -Wall -o loop
this page likely doesn’t use clang but GCC, so it won’t work.ok yeah didn’t work on my machine either
edit: interestingly enough seems to work on some architectures and not others, a friend of mine tried it and it worked for him. I guess that’s why it’s an undefined behvaior. :)