Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!brl-tgr!tgr!MLY.G.SHADES%MIT-OZ@MIT-MC.ARPA From: MLY.G.SHADES%MIT-OZ@MIT-MC.ARPA Newsgroups: net.lang.c Subject: Un-alignment in structures Message-ID: <9239@brl-tgr.ARPA> Date: Fri, 15-Mar-85 06:13:37 EST Article-I.D.: brl-tgr.9239 Posted: Fri Mar 15 06:13:37 1985 Date-Received: Sat, 16-Mar-85 05:05:37 EST Sender: news@brl-tgr.ARPA Lines: 23 the reason for the padding, which admittedly does not hold for some machines, is that many machines, notably the pdp-11, can not handle words generated at an odd address. if the compiler was allowed to generate incorrectly aligned data then the compiler would rapidly acquire, and rightfully so, a reputation for uselessness; the code produced would generate odd instruction traps at the most inconvenient locations. another interesting effect is with machines that don't have proper byte addressing but simulate it instead; pdp-10, and honeywell 600/6000/dps 8 line use an incrementing byte pointer into a word; the honewell level 6/dps 6 uses indexed byte instructions to generate offset and left/rightness; the raytheon rds 500/704 uses separate left/right instructions, except as i remember when the argument is indexed. this list is not by any means definitive or even reasonably exhaustive. it does however show why in a language that is to be as portable as possible (c) you would not want and should not include machine breaking structures. sorry but that's life down here in river city. shades%mit-oz%mit-mc.arpa@seismo (? looks right ?)