☆ Yσɠƚԋσʂ ☆ to Programmer Humor@lemmy.ml • 1 year agoOptimized Codelemmy.mlimagemessage-square11fedilinkarrow-up125arrow-down12
arrow-up123arrow-down1imageOptimized Codelemmy.ml☆ Yσɠƚԋσʂ ☆ to Programmer Humor@lemmy.ml • 1 year agomessage-square11fedilink
minus-square@dragnucs@lemmy.mllinkfedilink2•1 year agoTried it on https://www.onlinegdb.com/online_c++_compiler Could not reproduce.
minus-square@Prologue7642link3•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σɠƚԋσʂ ☆OPlinkfedilink2•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. :)