Union Problem on Sparc
Henry Spencer
henry at zoo.toronto.edu
Wed Nov 21 05:00:01 AEST 1990
In article <1990Nov4.031554.3208 at rice.edu> brad at ds3.bradley.edu (Bradley E. Smith) writes:
> union u x,z;
> (void) doit(x,z);
> (void) doit(0,0);
Did you try running "lint" on this? You will find type mismatches. `0'
is not a union value; it cannot be passed to a function that is expecting
to get a union. On some machines this accidentally works, but on a lot of
modern ones, it doesn't. There is no such thing as a "union constant" in
C, so you'll have to assign `0' to a union variable and pass the variable.
"I don't *want* to be normal!" | Henry Spencer at U of Toronto Zoology
"Not to worry." | henry at zoo.toronto.edu utzoo!henry
More information about the Comp.sys.sun
mailing list