On Tue, Jun 28, 2005 at 03:39:38PM +0100, Dave Korn wrote:
> ----Original Message----
> >From: Olivier Galibert
> >Sent: 28 June 2005 15:25
> 
> > In particular, a very large number of C and C++ programs are written
> > with the assumptions:
> 
>   This is a bad line of reasoning in general.  There is a vast amount of bad
> software in the world, some blatantly buggy, some subtly-incorrect.  To
> attempt to fix it all in the compiler rather than the source seems a bit
> bass-ackwards to me!
> 
> > - sizeof(int) == 4, sizeof(long long) == 8
> > 
> > - sizeof(long) == sizeof(void *) == sizeof(void (*)())
> > 
> > Break them and see your compiler rejected by pretty much everybody.
> 
>   And what about 64 bit architectures?  Your assumptions are already widely
> invalid and only going to get more so.

No, all of Olivier's assumptions are valid on LP64 as well as ILP32
architectures.  They are invalid on most DSP architectures, as well as
on 16-bit embedded architectures, which I suppose you could call "widely
invalid" if you count # of shipping parts.  But they are a reasonable
engineering tradeoff in many cases (it's a waste of time in most cases
for a program that does a lot of bit manipulation to consider the case
of 37 bit one's complement architectures with an 11 bit byte).




Reply via email to