Explanation, please!
Chris Torek
chris at mimsy.UUCP
Fri Sep 2 20:47:09 AEST 1988
-In article <9064 at pur-ee.UUCP> hankd at pur-ee.UUCP (Hank Dietz) writes:
-> *(((struct t512 *) q)++) = *(((struct t512 *) p)++);
-> but, for some unknown reason, the VAX C compiler didn't like that.
In article <339 at quintus.UUCP> jabir at quintus.uucp (Jabir Hussain) writes:
-one portable way around that is to do something like:
-
- typedef char *caddr_t;
- typedef union {
- struct { int t[512]; } t512;
- struct { int t[256]; } t256;
- caddr_t caddr;
- } ustruct_t;
...
- if (n & 512) *dst.t512++ = *src.t512++;
`Portable'? I suggest you try it on a Data General MV/10000.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.lang.c
mailing list