moss@brl.mil (Gary S. Moss (VLD/VMB) <moss>) (10/23/90)
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,
-Garyzombie@uucp (Mike York) (10/24/90)
In article <14219@smoke.BRL.MIL> moss@brl.mil writes about the 3.3 C compiler
puking on casts of structures to void. We reported this problem to the
hotline on September 11 (ID #F4358). The hotline confirmed that it's a
bug and sent it on to engineering. We never did get an SCR number. The
hotline wasn't sure if the fix would be included in the upcoming compiler
release. BTW, anybody know when the upcoming ANSI C compiler release is
scheduled?
--
Mike York | "Lord help me, I'm just not
Boeing Computer Services | that bright."
(206) 865-6577 |
zombie@voodoo.boeing.com | -Homer Simpson