Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!geacc022%timevx@CIT-HAMLET.ARPA From: geacc022%timevx@CIT-HAMLET.ARPA Newsgroups: net.lang.c Subject: Traps for a Vaxite Message-ID: <338@brl-tgr.ARPA> Date: Wed, 31-Jul-85 05:12:46 EDT Article-I.D.: brl-tgr.338 Posted: Wed Jul 31 05:12:46 1985 Date-Received: Thu, 1-Aug-85 21:20:32 EDT Sender: news@brl-tgr.ARPA Lines: 30 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@usc-ecl.arpa mbm@mit-xx.arpa uwmcsd1!jgd utzoo!henry mbarker@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."