Path: utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!ATHENA.MIT.EDU!raeburn From: raeburn@ATHENA.MIT.EDU (Ken Raeburn) Newsgroups: gnu.gcc.bug Subject: erroneous error message Message-ID: <8902110449.AA22347@PROMETHEUS.MIT.EDU> Date: 11 Feb 89 04:49:11 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 42 (version 1.33, vax) The following source file, when compiled with -DBUG, generates error messages about "invalid use of undefined type `struct nexus'" on the lines at the end with the multiple casts (from nested macros). When compiled without -DBUG, these messages don't occur. /* * test of gcc */ typedef unsigned char u_char; struct nexusconnect { #ifdef BUG volatile #endif struct nexus * xyzzy; }; struct nexus { int foo; }; struct uba_regs { long quux; }; volatile struct uba_regs *bar[] = { (volatile struct uba_regs *) (((volatile struct nexus *)0xf20000)+8), (volatile struct uba_regs *) (((volatile struct nexus *)0xf20000)+9), }; /* end of bar.c */ The error message also goes away if the cast to pointer-to-nexus has "volatile" removed. -- Ken