This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in g++2.95.1 syntax parsing(not exists in g++2.7.2.3)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Bug in g++2.95.1 syntax parsing(not exists in g++2.7.2.3)
- From: "Chen, Wen-Ke" <chwk at cs dot arizona dot edu>
- Date: Wed, 29 Sep 1999 03:38:09 +0000
- Organization: Computer Science Department, The University of Arizona
------------------------------------------------------------------------
Test file(bitfields.cc):
------------------------------------------------------------------------
#include <list.h>
enum MsgType {
MSG_DATA,
};
class C {
public:
MsgType mType : 8;
};
extern list<C> clist;
int main(void)
{
list<C>::iterator ci = clist.begin();
C& c = *ci;
c.mType = MSG_DATA; // no problem hear
if ( c.mType != MSG_DATA ) // syntax error here ???
return -1;
return 0;
}
------------------------------------------------------------------------
Compiling command and output:
------------------------------------------------------------------------
% g++ -c bitfield.cc
bitfield.cc: In function `int main()':
bitfield.cc:20: attempt to take address of bit-field structure member
`C::mType'