Subject: Re: [OT] Any sources for PDP-11 spares?
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Anders Magnusson <ragge@ludd.luth.se>
List: port-pdp10
Date: 06/11/2002 21:27:14
>
> Hmm? I think it's an excellent way to smoke out those hidden
> assumptions about word size.
>
Those assumptions are not especially well hidden, things like:
char c[4];
int32_t b;
b = c[0] << 24 | c[1] << 16 | c[2] << 8 | c[3];
are not uncommon in any program. This example may be handled either by
using int_least32_t and (depending on situation) shift left by CHAR_BIT.
Another solution would be to have a compiler-specific type that is 32 bit
and use that to get an int32_t type.
-- Ragge