Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!brl.mil!moss From: moss@brl.mil (Gary S. Moss (VLD/VMB) ) Newsgroups: comp.sys.sgi Subject: Bug in 3.3.1 cc: void cast of struct. Message-ID: <14219@smoke.BRL.MIL> Date: 23 Oct 90 13:56:13 GMT Sender: news@smoke.BRL.MIL Reply-To: moss@brl.mil Organization: Ballistic Research Laboratory Lines: 27 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