This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/35635] New: -Wconversion problematic with bitfields
- From: "tss at iki dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2008 06:13:37 -0000
- Subject: [Bug c/35635] New: -Wconversion problematic with bitfields
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
struct {
unsigned int x:1;
} foo;
int bar = 0;
foo.x = bar != 0; // warning
foo.x = bar != 0 ? 1 : 0; // warning
if (bar != 0) foo.x = 1; else foo.x = 0; // no warnings, but too ugly..
--
Summary: -Wconversion problematic with bitfields
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tss at iki dot fi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35635