cm0002 ( cm0002@lemmy.zip ) to Programmer Humor@programming.dev · 10 months agoMore code = more betterlemmy.zipimagemessage-square23linkfedilinkarrow-up1386
arrow-up1386imageMore code = more betterlemmy.zipcm0002 ( cm0002@lemmy.zip ) to Programmer Humor@programming.dev · 10 months agomessage-square23linkfedilink
minus-squareHirom ( Hirom@beehaw.org ) linkfedilinkarrow-up3·10 months 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·10 months 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.