cm0002 ( cm0002@lemmy.zip ) to Programmer Humor@programming.dev · 1 year agoMore code = more betterlemmy.zipimagemessage-square23linkfedilinkarrow-up1385
arrow-up1385imageMore code = more betterlemmy.zipcm0002 ( cm0002@lemmy.zip ) to Programmer Humor@programming.dev · 1 year agomessage-square23linkfedilink
minus-squareHirom ( Hirom@beehaw.org ) linkfedilinkarrow-up3·1 year agoAn infinite loop canot be ruled out in the last case, so a compiler couldn’t optimize this away without potentially changing the program behavior.
minus-squareyetAnotherUser ( yetAnotherUser@discuss.tchncs.de ) linkfedilinkarrow-up1·1 year agoInfinite loops are often weird though. They could be seen as undefined behavior and the compiler may do whatever it feels like.
An infinite loop canot be ruled out in the last case, so a compiler couldn’t optimize this away without potentially changing the program behavior.
Infinite loops are often weird though. They could be seen as undefined behavior and the compiler may do whatever it feels like.