9 comments
True
9 0 ReplyFalse
8 0 Replycosmic ray detected.
11 0 Reply
You should add returns ray detected outside of while loop
8 0 ReplyThat resembles some of my PowerShell waaay too much. If it wasn't for the cosmic ray thing, I thought this was my GitHub...
3 0 Reply
Any sane compiler will simplify this into
function cosmicRayDetector() { while(true) { } }
C++ may further 'simplify' this into
function cosmicRayDetector() { return }
8 0 ReplyIirc the issue was that while(true) would be removed while it should be replaced with ret and this caused a bug where the binary would execute next function
But I believe this way of cosmic ray detection would work
volatile bool condition = true; while(condition) { } printf("Cosmic ray detected");
4 0 Reply
The spacing on the parenthesis 🤢🤢🤢
1 0 Reply
9 comments
Scroll to top