Traps for a Vaxite
geacc022%timevx at CIT-HAMLET.ARPA
geacc022%timevx at CIT-HAMLET.ARPA
Wed Jul 31 19:12:46 AEST 1985
Thanks to those who responded with suggestions on traps that
programmers raised on a VAX should avoid when trying to write portable
code. Here's a summary of what was mentioned; most of these have been
discussed (sometimes at great length) on this list:
Pointer-pointer and -integer differences
int != long != short
NULL != 0
Signed vs. unsigned chars
Alignment (there *is* sometimes padding)
Byte ordering (aka the NUXI problem -- esp. but not all byte-swapping)
ASCII characters
Declarations of external functions
Declarations of functions returning non-ints
Length of external symbols
8-bit characters (and 16-bit shorts...)
One's-complement problems (e.g., -1 != ~0)
& operator on parameters and other non-variables.
Thanks to those who responded,
blarson at usc-ecl.arpa mbm at mit-xx.arpa uwmcsd1!jgd
utzoo!henry mbarker at bbnz.arpa baylor!peter mcvax!ken
Gary Ansok
geacc022%timevx @ cit-hamlet.arpa
gea @ caltech.bitnet
...ucbvax!cithep!timevx#geacc022
"All the world loves a straight man."
More information about the Comp.lang.c
mailing list