🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2274

erroneous error message

#2274
From: Ken Raeburn
Date: Sat, 11 Feb 1989 04:49
42 lines
1200 bytes
(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
Technical Details
Message-ID: <8902110449.AA22347@PROMETHEUS.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!ATHENA.MIT.EDU!raeburn

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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