Article View: comp.std.c
Article #3350Re: Struct hack one last time (one last time)
From: Martin Weitzel
Date: Sat, 09 Jan 1993 20:22
Date: Sat, 09 Jan 1993 20:22
25 lines
1486 bytes
1486 bytes
In article <1993Jan7.221207.13818@leland.Stanford.EDU> dkeisen@leland.Stanford.EDU (Dave Eisen) writes: [...] >This has nothing to do with malloc. The hypothetical compiler >could simply insert this error checking information whenever >it does a conversion from a (void *) to a (struct foo *). Again, >the basic question is still unresolved here: can a conversion >from one pointer type to another affect bytes other than those >where the pointer variable is stored? Which directly brings up the question if (or if not) for any modifiable lvalue `x' and some `y' of the same type an assignment x = y; may behave differently as a bitwise copy memcpy(&x, &y, sizeof x); (For the pedantics: Assume the appropriate header is included and the two objects do not overlap.) To put it into the language of the standard: May some (otherwise strictly conforming) program change its behavior if the above two were switched. -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83
Technical Details
Message-ID:
<1375@mwtech.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!Germany.EU.net!mikros!mwtech!martinReferences:
<1993Jan7.221207.13818@leland.Stanford.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!Germany.EU.net!mikros!mwtech!martin From: martin@mwtech.UUCP (Martin Weitzel) Newsgroups: comp.std.c Subject: Re: Struct hack one last time (one last time) Message-ID: <1375@mwtech.UUCP> Date: 9 Jan 93 20:22:06 GMT References: <1993Jan7.221207.13818@leland.Stanford.EDU> Reply-To: martin@mwtech.UUCP (Martin Weitzel) Organization: MIKROS Systemware, Darmstadt/W-Germany Lines: 25