[Bug c++/39089] New: -Wconversion is buggy with bitwise operators
oleg dot smolsky at riverbed dot com
gcc-bugzilla@gcc.gnu.org
Tue Feb 3 17:57:00 GMT 2009
g++ 4.3.3 emits warnings for every statement in the following function when the
code is built this way:
..../gcc43/bin/g++ -c -Wall -Wconversion test.cpp
void func(unsigned char a, unsigned char b, unsigned char *out)
{
*out = a | b;
*out = out[0] & 0x20;
out[0] &= 0x20;
}
I'd expect bitwise operators to see/preserve argument widths...
--
Summary: -Wconversion is buggy with bitwise operators
Product: gcc
Version: 4.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: oleg dot smolsky at riverbed dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39089
More information about the Gcc-bugs
mailing list