Article View: net.bugs
Article #434Array of unions
From: rmc
Date: Thu, 27 Jun 1985 18:30
Date: Thu, 27 Jun 1985 18:30
19 lines
1073 bytes
1073 bytes
I defined an array of unions as follows:
typedef union {
unsigned char *bytes;
unsigned long *words;
} block;
block sched[NKEYS];
Now if I try to pass sched[i] as a parameter,
the C compiler bombs with "Fatal error in /lib/ccom".
Maybe I should have known that arrays of unions don't
compile, but couldn't the compiler leave me a more
descriptive message? I'll I'm asking for is a line
number -- that bug took me a couple of hours to locate.
R. Martin Chavez
(rmc@lanl.ARPA, chavez@harvard.ARPA)
Technical Details
Message-ID:
<27676@lanl.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!cmcl2!lanl!rmcShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site lanl.ARPA Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!cmcl2!lanl!rmc From: rmc@lanl.ARPA Newsgroups: net.bugs Subject: Array of unions Message-ID: <27676@lanl.ARPA> Date: Thu, 27-Jun-85 14:30:50 EDT Article-I.D.: lanl.27676 Posted: Thu Jun 27 14:30:50 1985 Date-Received: Sat, 29-Jun-85 01:10:32 EDT Distribution: net Organization: Los Alamos National Laboratory Lines: 19