About undefined behaviour...
About undefined behaviour...
Posted Aug 23, 2012 16:03 UTC (Thu) by pwood (guest, #86373)In reply to: About undefined behaviour... by juhl
Parent article: Signed overflow optimization hazards in the kernel
John Regehr's blog posts on undefined behaviour are always worth reading (his research group developed the IOC patch to clang that a couple of people have linked to above.) In the context of integer behaviour in C he has a quiz here which is worth a look. I'm not sure that you ever want to rely on undefined behaviour as suggested in the article as it means that the execution of your program is undefined and can change at the compiler's will. That is very different from relying on implementation defined behaviour.
