🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #337

Unnamed bit-field causes a problem.

#337
From: David.Detlefs
Date: Mon, 07 Aug 1989 19:54
23 lines
1046 bytes
Using G++ 1.35 on the following file:

--------------------------------------------------
typedef	unsigned int	msg_size_t;

typedef struct {
	unsigned int	:24,
	msg_simple : 8;
}
msg_header_t;
--------------------------------------------------

Produces the following message:

bug.c:6: storage class specified for structure field `msg_simple'

I believe this code is correct; it does not produce any error message
in AT&T cfront 1.2.1.  I find this to be a strange bug, because it has
a fairly complicated minimal example: if I remove any significant part
of the above file, G++ compiles it without complaint.  Sorry I can't
be more helpful.

Dave
Technical Details
Message-ID: <8908071954.AA25526@AENEAS.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!F.GP.CS.CMU.EDU!David.Detlefs

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!F.GP.CS.CMU.EDU!David.Detlefs
From: David.Detlefs@F.GP.CS.CMU.EDU
Newsgroups: gnu.g++.bug
Subject: Unnamed bit-field causes a problem.
Message-ID: <8908071954.AA25526@AENEAS.MIT.EDU>
Date: 7 Aug 89 19:54:25 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 23