This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27979] 4.2 Regression] conversion check confused by enum bitfields
- From: "tbm at cyrius dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2006 17:47:16 -0000
- Subject: [Bug c++/27979] 4.2 Regression] conversion check confused by enum bitfields
- References: <bug-27979-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from tbm at cyrius dot com 2006-06-09 17:47 -------
The following, related example, fails with gcc 4.2 20060508 but works with
20060530. It would be great if whoever works on this PR could check what
change was responsible to get this working, and if it was just an accidental
change, whether the following test case should be added to the test suite:
enum EBorderStyle {
BNATIVE, BNONE, BHIDDEN
};
class BorderValue
{
public:
EBorderStyle style : 8;
};
class bar
{
BorderValue *border;
EBorderStyle foo() { return border ? border->style : BHIDDEN; }
};
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27979