On 2010-01-05 21:29:22 +0000, Andrew Haley wrote: > On the contrary, you haven't even addressed the core issue. 6.3.2.3 > limits the pointer conversions that you may do without undefined > behaviour. The conversion in your example displays undefined > behaviour, since it is not permitted by 6.3.2.3. Therefore, your > example is not legal C. Once you have a single example of undefined > beaviour, the rest of the program is irrelevant.
I disagree. The conversion in Joshua's example has a defined behavior if the pointer is correctly aligned. Then the question is whether Joshua's example is a simplification of a more complex code that ensures that, or whether this is implied by the architecture (ABI) and compiler options he used. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)