Bug in 3.3.1 cc: void cast of struct.
Gary S. Moss VLD/VMB <moss>
moss at brl.mil
Tue Oct 23 23:56:13 AEST 1990
I intend to call this in to the Hotline, but it is a lot easier to provide
test cases electronically, so here goes:
main()
{ static struct coord
{
double x, y, z;
}
a = { 1.0, 2.0, 3.0 }, b;
(void)(b = a);
}
$ make voidcast
cc -O voidcast.c -o voidcast
ccom: Error: voidcast.c, line 7: Cast of struct/union is illegal
(void)(b = a);
-----------------------^
*** Error code 1
I have it on authority from one of the members (Doug Gwyn) of the ANSI C (X3J11)
standardization committee that any type may be cast to void. Forget why I want
to do this, the example is a simplification. This works fine under the IRIX
3.2.2 version of cc, but not under 3.3.1.
Please, can we have a fix soon?
Thanks,
-Gary
More information about the Comp.sys.sgi
mailing list