Newsgroups: comp.sys.transputer
From: Michael Haardt <(michael)u31b3hs@pool.informatik.rwth-aachen.de>
Subject: Implementation of short int in C compilers?
Organization: An old and gray machine, somewhere in Moria.
Date: Wed,  2 Feb 94 12:19:38 MET
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-ID: <940202153@gandalf.moria>

I see myself forced to implement short int as 16 bit type, with the 
overhead of byte accesses, because an alignment of at most 2 is needed.

How do the various C compilers implement short ints? Does any of them
use an alignment of 1 or 4, or perhaps context dependent alignments?  
(like: 4 for variables, 2 for structs and arrays)

Are there any smart ideas for code generation of indirect access when no
"dup" is available, which do not use a temporary variable to save the
pointer?

Michael
--
Twiggs and root are a wonderful tree (tm) Twiggs & root 1992 :-)

