Hacker News new | ask | show | jobs
by lmm 1106 days ago
I'd go so far as to say it's unlikely the average C programmer has ever written a program with defined behaviour.
1 comments

So my 5k lines of C code project from back in college is all... undefined?
Almost certainly. Of course the only way you'll find out is when you upgrade GCC and it suddenly leaks the contents of your memory to the whole world.
No need to wait for that, running it through valgrind will surely uncover some UBs (but do note that even if it didn’t uncover anything, it doesn’t prove their absence, only that this particular run through the state space didn’t encounter any valgrind looks for).