Article View: net.lang.c
Article #9581Re: Block Initialization; structs and sizeof
From: Pedz Thing
Date: Wed, 15 Oct 1986 21:14
Date: Wed, 15 Oct 1986 21:14
16 lines
1387 bytes
1387 bytes
In article <1971@dciem.UUCP> msb@dciem.UUCP (Mark Brader) says that in effect (&variable + sizeof(variable) > &nextvariable) is possible. While I understand his argument and reasoning, I hope that this is not true. This would break many things it seems to me. In particular, varargs would be a very difficult thing to write since the "nextarg" (or whatever it is called) would have to know the type of the next argument in order to figure out the padding. (I guess the compiler could make an exception in the case of parameters passed on the stack.) It just seems like frequently code assumes that the sizeof(variable) is exactly equal to the offset of that variable from the next one. -- Perry Smith ctvax ---\ megamax --- bobkat!pedz pollux---/
Technical Details
Message-ID:
<192@bobkat.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!caip!clyde!cuae2!ltuxa!we53!sw013b!dj3b1!killer!ndmce!pollux!bobkat!pedzReferences:
<586@calma.UUCP> <1971@dciem.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!caip!clyde!cuae2!ltuxa!we53!sw013b!dj3b1!killer!ndmce!pollux!bobkat!pedz From: pedz@bobkat.UUCP (Pedz Thing) Newsgroups: net.lang.c Subject: Re: Block Initialization; structs and sizeof Message-ID: <192@bobkat.UUCP> Date: Wed, 15-Oct-86 17:14:40 EDT Article-I.D.: bobkat.192 Posted: Wed Oct 15 17:14:40 1986 Date-Received: Fri, 17-Oct-86 05:48:40 EDT References: <586@calma.UUCP> <1971@dciem.UUCP> Reply-To: pedz@bobkat.UUCP (Pedz Thing) Distribution: net Organization: Digital Lynx; Dallas, TX Lines: 16