Re: Bitfield conversion bug in 4.2?

2007-03-19 Thread Jim Wilson
Eric Lemings wrote: test.cpp: In function 'int main()': test02.cpp:6: error: could not convert 's.S::v' to 'bool' test02.cpp:6: error: in arguument to unary ! As per my gcc-bugs message. I suggest this untested patch. -- Jim Wilson, GNU Tools Support, http://www.specifi

Re: Bitfield conversion bug in 4.2?

2007-03-19 Thread Ismail Dönmez
On Monday 19 March 2007 23:00:09 Eric Lemings wrote: > Hi, > > The following code compiles fine in GCC 4.1. > > enum E { e }; > struct S { > E v:5; > }; > S s; > int main() { if (!s.v) return 0; } > > In 4.2 (20070307), it gives the following error: > > t

Bitfield conversion bug in 4.2?

2007-03-19 Thread Eric Lemings
Hi, The following code compiles fine in GCC 4.1. enum E { e }; struct S { E v:5; }; S s; int main() { if (!s.v) return 0; } In 4.2 (20070307), it gives the following error: test.cpp: In function 'int main()': test02.cpp:6: error: