Hacker News new | ask | show | jobs
by saagarjha 1782 days ago
I don’t see the undefined behavior here?
1 comments

Op probably means cpp, where it is indeed undefined behavior. not sure about c. I doubt that if this would cause a "my game does not work on XXX" though. Is there really a compiler out there that will handle such abuse differently?
yes its undefined behaviour in both C and C++. Yes, a number of compilers treat this differently, its also poorly supported on custom hardware using standard compilers like gcc. So compiling for some mobile device with slightly custom ... good luck.
It is not undefined behavior in C. And the OP was about C.
I don't mean cpp