Path: utzoo!utgpu!news-server.csri.toronto.edu!dgp.toronto.edu!flaps Newsgroups: comp.std.c From: flaps@dgp.toronto.edu (Alan J Rosenthal) Subject: low-level knowledge of your friendly neighbourhood C compiler Message-ID: <1990May2.150837.946@jarvis.csri.toronto.edu> References: <1990Apr25.180007.13243@cunixf.cc.columbia.edu> <12694@smoke.BRL.MIL> <2647@mica6.UUCP> <1990Apr28.232221.20725@utzoo.uucp> <2700@mica6.UUCP> <1990May1.165701.4289@utzoo.uucp> <2746@mica6.UUCP> Date: 2 May 90 19:08:37 GMT Lines: 13 henley@motcid.UUCP (Aaron Henley) writes: >I think people should and in many cases must be aware of how their compiler >allocates memory for structures, what happens when you typecast a word from a >memory location starting at a point that isn't word aligned, etc... These and >many other usages of C are ambiguously defined. This is completely wrong. These things are UNDEFINED, not at all ambiguous. The following two statements are both unambiguously false: a) dereferencing a misaligned pointer in C dumps core; and b) dereferencing a misaligned pointer in C doesn't dump core. That's what undefined means. It doesn't mean that one of them is true. ajr