[gnu.gcc.bug] erroneous error message

raeburn@ATHENA.MIT.EDU (Ken Raeburn) (02/11/89)

(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