Subject: Re: long long vs. -ansi...
To: Andrew Reilly <>
From: Eduardo E. Horvath <>
List: current-users
Date: 04/08/1997 09:42:25
On Tue, 8 Apr 1997, Andrew Reilly wrote:

> I would suggest that a struct {unsigned long; long;} would
> be better than an array of char, mostly because there is
> some hope of copy sematics applying for return values of
> this type, but partly because I've recently had experience
> (DSP) of a machine that had an ANSI C compiler but all types
> (including char) were 32 bits and had sizeof(long)=1.  Word
> addressable, you see.

I'm glad you brought up this issue.  This won't work for SPARC machines
which have H/W support for long long and require these values 8-byte
aligned.  If you ever allocate a 64-bit integer in a model that does not
grok long long and pass it to a module that does, you are likely to suffer
from an unaligned access fault.  What will happen if you try to run one of
these binaries on a true 64-bit machine is left as an excersize for the

Eduardo Horvath
"Cliffs are for climbing.  That's why God invented grappling hooks."
					- Benton Frasier